Re: How to extend struct stat?
Jamie Lokier (lkd@tantalophile.demon.co.uk)
Mon, 11 Oct 1999 18:11:57 +0200
Ulrich Drepper wrote:
> "Richard B. Johnson" <root@chaos.analogic.com> writes:
>
> > In a related note, I recently noticed that the `struct dirent` ,
> > /usr/include/direntry.h, contains a d_type field that is always
> > zero. This makes it necessary to make additional calls to lstat
> > to find out the nature of a file. This may be a 'C' library problem,
> > but defining '__USE_BSD' (see /usr/include/dirent.h) didn't fill
> > in the field.
>
> This is no C library problem and also no bug in the kernel. It's
> simply that I added the field since it's very useful but the kernel
> wasn't extended to provide this information. As a default value 0 is
> correct since it says that no information is available. I would very
> much like the information to be passed up (since it is easily
> available in the kernel) which will immediately lead to several
> programs (like find, make) run faster.
Is there demand for this? I'm prepared to write a nice tidy
new_getdents that returns d_type and structures in the format Glibc
would like if there's the demand.
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/