diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-05-24 05:43:32 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-05-24 05:43:32 +0000 |
commit | 7a6e90a24ababc01e84a168be0d99e0c06d2dea2 (patch) | |
tree | 21dec0bed41c51cade59d04416b84271d2e63867 /usr.bin/aucat | |
parent | 757d44844da85b55fbad10cfaa740dcfa9b26579 (diff) |
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
Diffstat (limited to 'usr.bin/aucat')
0 files changed, 0 insertions, 0 deletions