summaryrefslogtreecommitdiffstats
path: root/src/ext2_common.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-08-31 19:01:38 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-08-31 19:01:38 +0200
commitcf700c77551b30d9c62104adaf47ebbf26774fcc (patch)
treeb0eb6a090c49e1d37b8bf843386135d51f1b241b /src/ext2_common.c
parentda8028ea3fb282cee6fd54f4ac8c8a53dacfa967 (diff)
allow 64 KiB ext4 blocksize
Diffstat (limited to 'src/ext2_common.c')
-rw-r--r--src/ext2_common.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ext2_common.c b/src/ext2_common.c
index 021bcf0..4ae4e8b 100644
--- a/src/ext2_common.c
+++ b/src/ext2_common.c
@@ -67,8 +67,17 @@ int test_EXT2(const struct ext2_super_block *sb, partition_t *partition)
return 5;
if(td_ext2fs_blocks_count(sb) == 0) /* reject empty filesystem */
return 6;
- if(le32(sb->s_log_block_size)>2) /* block size max = 4096, can be 8192 on alpha */
- return 7;
+ switch(le32(sb->s_log_block_size))
+ {
+ case 0:
+ case 1:
+ case 2: /* block size = 4096 (default) */
+ case 3: /* can be 8192 on alpha */
+ case 6: /* 64 KiB */
+ break;
+ default:
+ return 7;
+ }
if(le32(sb->s_blocks_per_group)==0)
return 8;
if(partition==NULL)