summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-08-12 20:28:09 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-08-12 20:28:09 +0200
commitb76d14734455fd105b81e5ad0bdae2956583484c (patch)
treee04dfd716d94631d12017014635696d641e2dc6c
parent7528a77a4c07ad2ac05dc6955c91369ccedaf0da (diff)
Fix ext3/ext4 dedicated journal partition detection
-rw-r--r--src/ext2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ext2.c b/src/ext2.c
index 0083c9d..e162e20 100644
--- a/src/ext2.c
+++ b/src/ext2.c
@@ -167,8 +167,8 @@ static int test_EXT2(const struct ext2_super_block *sb, partition_t *partition)
/* There is a little offset ... */
if(le16(sb->s_magic)!=EXT2_SUPER_MAGIC)
return 1;
- if (le32(sb->s_free_blocks_count) >= le32(sb->s_blocks_count)) return 2;
- if (le32(sb->s_free_inodes_count) >= le32(sb->s_inodes_count)) return 3;
+ if (le32(sb->s_free_blocks_count) > le32(sb->s_blocks_count)) return 2;
+ if (le32(sb->s_free_inodes_count) > le32(sb->s_inodes_count)) return 3;
if (le16(sb->s_errors)!=0 &&
(le16(sb->s_errors) != EXT2_ERRORS_CONTINUE) &&
(le16(sb->s_errors) != EXT2_ERRORS_RO) &&