Re: Puzzled: Memory alignment is struct stat

Ulrich Drepper (drepper@cygnus.com)
05 Oct 1999 14:33:37 -0700


Andreas Gruenbacher <a.gruenbacher@infosys.tuwien.ac.at> writes:

> In the kernel, the st_mode field of struct stat is 16 bit (unsigned
> short).
> In userland, it is unsigned int (32 bit on my machine). There must be
> some
> conversion between the two types, but I can't find it.
>
> It's not in fs/stat.c...

Of course it's not in stat.c, this is only a SysV-style compatibility
wrapper. xstat() is the real implementation and the Linux versions
are in the Linux specific directory. The file you're interested in is

sysdeps/unix/sysv/linux/xstatconv.c

which is used by all these functions.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

- 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/