diff options
author | Kay Sievers <kay@pim.off.vrfy.org> | 2005-10-23 21:12:51 +0200 |
---|---|---|
committer | Kay Sievers <kay@pim.off.vrfy.org> | 2005-10-23 21:12:51 +0200 |
commit | 7f0a5b80957844148d05ba5218c40b70910a6b49 (patch) | |
tree | ad4f2118efa8e0bc6892b916e732eae45dcca303 /extras/volume_id | |
parent | eba25b20ce19cb273785f72f169c60406edacc3a (diff) |
volume_id: fix typo in ext blocksize check
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'extras/volume_id')
-rw-r--r-- | extras/volume_id/volume_id/ext.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/extras/volume_id/volume_id/ext.c b/extras/volume_id/volume_id/ext.c index e80ac90ad6..a3e20d3151 100644 --- a/extras/volume_id/volume_id/ext.c +++ b/extras/volume_id/volume_id/ext.c @@ -86,6 +86,13 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off) if (es->s_magic != cpu_to_le16(EXT_SUPER_MAGIC)) return -1; + bsize = 0x400 << le32_to_cpu(es->s_log_block_size); + dbg("ext blocksize 0x%zx", bsize); + if (bsize < EXT3_MIN_BLOCK_SIZE || bsize > EXT3_MAX_BLOCK_SIZE) { + dbg("invalid ext blocksize"); + return -1; + } + volume_id_set_label_raw(id, es->s_volume_name, 16); volume_id_set_label_string(id, es->s_volume_name, 16); volume_id_set_uuid(id, es->s_uuid, UUID_DCE); @@ -99,13 +106,6 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off) return 0; } - bsize = 0x200 << le32_to_cpu(es->s_log_block_size); - dbg("ext blocksize 0x%zx", bsize); - if (bsize < EXT3_MIN_BLOCK_SIZE || bsize > EXT3_MAX_BLOCK_SIZE) { - dbg("invalid ext blocksize"); - return -1; - } - /* check for ext2 / ext3 */ volume_id_set_usage(id, VOLUME_ID_FILESYSTEM); if ((le32_to_cpu(es->s_feature_compat) & EXT3_FEATURE_COMPAT_HAS_JOURNAL) != 0) |