mirror of
https://github.com/limine-bootloader/limine
synced 2025-01-07 13:22:18 +03:00
Fix wrong sizeof in the ext4 bgd branch
This commit is contained in:
parent
3c562830d2
commit
7f5fcad288
BIN
limine.bin
BIN
limine.bin
Binary file not shown.
@ -182,11 +182,11 @@ static int ext2_get_inode(struct ext2_inode *ret, uint64_t drive, struct part *p
|
|||||||
const uint64_t block_size = ((uint64_t)1024 << sb->s_log_block_size);
|
const uint64_t block_size = ((uint64_t)1024 << sb->s_log_block_size);
|
||||||
uint64_t ino_offset;
|
uint64_t ino_offset;
|
||||||
const uint64_t bgd_start_offset = block_size >= 2048 ? block_size : block_size * 2;
|
const uint64_t bgd_start_offset = block_size >= 2048 ? block_size : block_size * 2;
|
||||||
const uint64_t bgd_offset = bgd_start_offset + (sizeof(struct ext2_bgd) * ino_blk_grp);
|
|
||||||
const uint64_t ino_size = sb->s_rev_level == 0 ? sizeof(struct ext2_inode) : sb->s_inode_size;
|
const uint64_t ino_size = sb->s_rev_level == 0 ? sizeof(struct ext2_inode) : sb->s_inode_size;
|
||||||
|
|
||||||
if (!bit64) {
|
if (!bit64) {
|
||||||
struct ext2_bgd target_descriptor;
|
struct ext2_bgd target_descriptor;
|
||||||
|
const uint64_t bgd_offset = bgd_start_offset + (sizeof(struct ext2_bgd) * ino_blk_grp);
|
||||||
|
|
||||||
read_partition(drive, part, &target_descriptor, bgd_offset, sizeof(struct ext2_bgd));
|
read_partition(drive, part, &target_descriptor, bgd_offset, sizeof(struct ext2_bgd));
|
||||||
|
|
||||||
@ -194,6 +194,7 @@ static int ext2_get_inode(struct ext2_inode *ret, uint64_t drive, struct part *p
|
|||||||
(ino_size * ino_tbl_idx);
|
(ino_size * ino_tbl_idx);
|
||||||
} else {
|
} else {
|
||||||
struct ext4_bgd target_descriptor;
|
struct ext4_bgd target_descriptor;
|
||||||
|
const uint64_t bgd_offset = bgd_start_offset + (sizeof(struct ext4_bgd) * ino_blk_grp);
|
||||||
|
|
||||||
read_partition(drive, part, &target_descriptor, bgd_offset, sizeof(struct ext4_bgd));
|
read_partition(drive, part, &target_descriptor, bgd_offset, sizeof(struct ext4_bgd));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user