aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-04-01 14:11:11 -0800
committerH. Peter Anvin <hpa@zytor.com>2006-04-01 14:11:11 -0800
commit2f7cdff4361e65c6405a0a0e17363e9684567fa0 (patch)
treeafa4c907b08a5daecd4e2e0c2b9b4520376e16f7
parent3def9e8b76f265ce6e5556f1a14d5772bc407ad7 (diff)
downloadklibc-2f7cdff4361e65c6405a0a0e17363e9684567fa0.tar.gz
[klibc] Test for ext3/ext2 before testing minixklibc-1.3.1
Based on a patch by Jeff Bailey <jbailey@ubuntu.com> Signed-off-by: Jeff Bailey <jbailey@ubuntu.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--usr/kinit/fstype/fstype.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/kinit/fstype/fstype.c b/usr/kinit/fstype/fstype.c
index beb795906c0c7d..c892c6b135faf8 100644
--- a/usr/kinit/fstype/fstype.c
+++ b/usr/kinit/fstype/fstype.c
@@ -229,6 +229,11 @@ struct imagetype {
int (*identify)(const void *, unsigned long long *);
};
+/*
+ * Note:
+ * Minix test needs to come after ext3/ext2, since it's possible for
+ * ext3/ext2 to look like minix by pure random chance.
+ */
static struct imagetype images[] = {
{ 0, "gzip", gzip_image },
{ 0, "cramfs", cramfs_image },
@@ -237,9 +242,9 @@ static struct imagetype images[] = {
{ 0, "luks", luks_image },
{ 0, "lvm2", lvm2_image },
{ 1, "lvm2", lvm2_image },
- { 1, "minix", minix_image },
{ 1, "ext3", ext3_image },
{ 1, "ext2", ext2_image },
+ { 1, "minix", minix_image },
{ 8, "reiserfs", reiserfs_image },
{ 64, "reiserfs", reiserfs_image },
{ 32, "jfs", jfs_image },