osdev
osdev copied to clipboard
Issue in bgd_t structure definition in osdev/src/include/ext2.h
The following structure definition is not in accordance with the osdev
The mistake is minor, but significant... This will give wrong info about no. of free blocks, no. of free nodes, and number of directories present.
typedef struct bgd { uint32_t block_bitmap; uint32_t inode_bitmap; uint32_t inode_table; uint32_t free_blocks; <-- This is supposed to be 2 byes uint32_t free_inodes; <-- 2 bytes uint32_t num_dirs; <-- 2 bytes uint32_t unused1; uint32_t unused2; <-- More padding needs to be added }attribute ((packed)) bgd_t;