That's so smart~
Before I saw these codes in Solaris, I saw the direct structure in Minix:
#define DIRSIZ 60
struct direct {
ino_t d_ino;
char d_name[DIRSIZ];
};
Minix just gives the simplest version. So when I met direct in Solaris I was
confused. Thanks a lot!
BTW, I saw linux:
struct dirent
{
#ifndef __USE_FILE_OFFSET64
__ino_t d_ino;
__off_t d_off;
#else
__ino64_t d_ino;
__off64_t d_off;
#endif
unsigned short int d_reclen;
unsigned char d_type;
char d_name[256]; /* We must not include limits.h! */
};
There it has both d_reclen and [256] char, so I guess linux must have some
waste of memory if the name is rather short, am I right?
--
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code