#1363 closed defect (fixed)
32 bit values not written correctly in FAT f/s data
Reported by: | Gene Smith | Owned by: | Chris Johns |
---|---|---|---|
Priority: | normal | Milestone: | 4.10 |
Component: | fs/fat | Version: | 4.9 |
Severity: | normal | Keywords: | |
Cc: | joel.sherrill@…, chrisj@… | Blocked By: | |
Blocking: |
Description
In cpukit/libfs/src/dosfs/fat.h the macro FAT_SET_VAL32 (line 126) has an incorrect "&&" when just "&" is intended it seems. This results in an incorrect encoding in the f/s of 32-bit values such as "number of sectors in the filesystem." For my disk the correct value was 0x0001B708 (correctly read from the MBR sector 0) but the encoded value was 0x10001 (put in FAT boot record sector 63 when formatted). This resulted in the disk appearing 1/2 full in linux gparted when it only contained a single small file copied to it in rtems. Also, linux df showed an incorrect number of 1k blocks available. Note: my "disk" is an MMC card formatted to FAT16.
Attachments (1)
Change History (5)
comment:1 Changed on 01/28/09 at 23:15:40 by Chris Johns
Cc: | Chris Johns added |
---|---|
Owner: | changed from Joel Sherrill to Chris Johns |
comment:2 Changed on 01/29/09 at 14:04:55 by Joel Sherrill
Cc: | Joel Sherrill added |
---|
Changed on 01/29/09 at 15:03:28 by Gene Smith
Attachment: | fat.h.patch added |
---|
comment:3 Changed on 01/29/09 at 15:15:21 by Joel Sherrill
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch applied to all active branches and CVS head. Thanks.
comment:4 Changed on 10/10/17 at 06:50:58 by Sebastian Huber
Component: | fs → fs/fat |
---|
Patch to resolve problem