diff options
author | Steven Lang <Steven.Lang@hgst.com> | 2015-01-08 17:22:02 -0800 |
---|---|---|
committer | Phillip Susi <psusi@ubuntu.com> | 2016-04-10 21:45:50 -0400 |
commit | d15a596a4436a08b9ad9db35729740b6314d536b (patch) | |
tree | 106aaa610a06866a94fe5215b303a707c86e379d /libparted/fs/ext2 | |
parent | e09c30fb53179319ba1543813b5b4024e923b795 (diff) | |
download | parted-d15a596a4436a08b9ad9db35729740b6314d536b.tar.gz |
Use disk geometry as basis for ext2 sector sizes.
When creating the geom for probed ext2 based filesystems, the
size was being reported in 512 byte sectors, regardless of what
the actual sector size of the device is.
Diffstat (limited to 'libparted/fs/ext2')
-rw-r--r-- | libparted/fs/ext2/interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libparted/fs/ext2/interface.c b/libparted/fs/ext2/interface.c index 890a47b..a90c592 100644 --- a/libparted/fs/ext2/interface.c +++ b/libparted/fs/ext2/interface.c @@ -41,7 +41,7 @@ _ext2_generic_probe (PedGeometry* geom, int expect_ext_ver) struct ext2_super_block *sb = (struct ext2_super_block *)(sb_v + 1024); if (EXT2_SUPER_MAGIC(*sb) == EXT2_SUPER_MAGIC_CONST) { - PedSector block_size = 1 << (EXT2_SUPER_LOG_BLOCK_SIZE(*sb) + 1); + PedSector block_size = (EXT2_MIN_BLOCK_SIZE << (EXT2_SUPER_LOG_BLOCK_SIZE(*sb))) / geom->dev->sector_size; PedSector block_count = EXT2_SUPER_BLOCKS_COUNT(*sb); PedSector group_blocks = EXT2_SUPER_BLOCKS_PER_GROUP(*sb); PedSector group_nr = EXT2_SUPER_BLOCK_GROUP_NR(*sb); |