|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
CVS: cvs.openbsd.org: src
From: Brad Smith (brad
cvs.openbsd.org)
Date: Tue May 24 2005 - 00:43:31 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
CVSROOT: /cvs
Module name: src
Changes by: brad
cvs.openbsd.org 2005/05/23 23:43:31
Modified files:
sys/ntfs : ntfs_subr.c
Log message:
Fix our NTFS readdir function.
To check a directory's in-use bitmap bit by bit, we use
a pointer to an 8 bit wide unsigned value.
The index used to dereference this pointer is calculated
by shifting the bit index right 3 bits. Then we do a
logical AND with the bit# represented by the lower 3
bits of the bit index.
This is an idiomatic way of iterating through a bit map
with simple bitwise operations.
This commit fixes the bug that we only checked bits
3:0 of each 8 bit chunk, because we only used bits 1:0
of the bit index for the bit# in the current 8 bit value.
This resulted in files not being returned by getdirentries(2).
Change the type of the bit map pointer from `char *' to
`u_int8_t *'.
From FreeBSD
ok pedro
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]