tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Directory entry parsing code has changed on NetBSD 4.0



In article <200803151730.29837.hselasky%c2i.net@localhost>,
Hans Petter Selasky  <hselasky%c2i.net@localhost> wrote:
>On Saturday 15 March 2008, Joerg Sonnenberger wrote:
>> On Sat, Mar 15, 2008 at 02:43:35PM +0100, Hans Petter Selasky wrote:
>> > devfs_newdirent in:
>> >
>> > http://www.selasky.org/hans_petter/isdn4bsd/sources/module/freebsd_devfs_
>> >devs.c
>>
>> What's GENERIC_DIRSIZ? I am wildly guessing if that is the problem...
>>
>> Joerg
>
>Hi,
>
>It's defined like this:
>
>#  define GENERIC_DIRSIZ(dp) \
>    ((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
>

This is wrong. On NetBSD inodes are 64 bits and dirent is aligned with 8
bytes instead of 4. Look in <sys/dirent.h> for more info.

christos



Home | Main Index | Thread Index | Old Index