This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 1/5] mips: Do not malloc on getdents64 fallback
- From: Florian Weimer <fweimer at redhat dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 28 Aug 2019 16:42:26 +0200
- Subject: Re: [PATCH v2 1/5] mips: Do not malloc on getdents64 fallback
- References: <20190731183136.21545-1-adhemerval.zanella@linaro.org>
* Adhemerval Zanella:
> struct kernel_dirent
> + {
> + unsigned long d_ino;
> + unsigned long d_off;
> + unsigned short int d_reclen;
> + char d_name[1];
> + } kbuf[KBUF_SIZE / sizeof (struct kernel_dirent)];
I think it's still not clear to me in which cases we actually need to
move the dirent entries in the buffer. My impression is that we just
need to move d_name by one byte because before, d_type was after the
name, and afterwards, it comes before the name. But the record
boundaries are unchanged.
Thanks,
Florian