]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: diffs between errors and failed probing in via raid
authorKarel Zak <kzak@redhat.com>
Wed, 11 Sep 2013 10:54:19 +0000 (12:54 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Sep 2013 10:57:22 +0000 (12:57 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/superblocks/via_raid.c

index eba7e4bf2f4caee05e56d898fb6959fb0820f32f..5f91cc40539e21f015c21da6fcdd25ce705a2481 100644 (file)
@@ -52,9 +52,9 @@ static int probe_viaraid(blkid_probe pr,
        struct via_metadata *v;
 
        if (pr->size < 0x10000)
-               return -1;
+               return 1;
        if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
-               return -1;
+               return 1;
 
        off = ((pr->size / 0x200)-1) * 0x200;
 
@@ -64,12 +64,14 @@ static int probe_viaraid(blkid_probe pr,
                                sizeof(struct via_metadata));
        if (!v)
                return -1;
+
        if (le16_to_cpu(v->signature) != VIA_SIGNATURE)
-               return -1;
+               return 1;
        if (v->version_number > 2)
-               return -1;
+               return 1;
        if (!via_checksum(v))
-               return -1;
+               return 1;
+
        if (blkid_probe_sprintf_version(pr, "%u", v->version_number) != 0)
                return -1;
        if (blkid_probe_set_magic(pr, off,