]> err.no Git - util-linux/commitdiff
blkid: fix ext2 SEC_TYPE
authorKarel Zak <kzak@redhat.com>
Tue, 23 Sep 2008 12:57:53 +0000 (14:57 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Feb 2009 22:21:45 +0000 (23:21 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libs/blkid/src/blkidP.h
libs/blkid/src/probe.c
libs/blkid/src/probers/ext.c

index e32d7dcded86e03e789861c4bb2f05ebad138ec1..e5641d6b7ac599a5feef9a9663cd024283195c3a 100644 (file)
@@ -127,7 +127,6 @@ struct blkid_idmag
 struct blkid_idinfo
 {
        const char      *name;                  /* FS/RAID name */
-       const char      *secname;               /* second FS/RAID name */
        int             usage;                  /* BLKID_USAGE_* flag */
 
                                                /* probe function */
index bbcc8be50ef054c7fb90398baa3313586b887237..06a49bf8a26a56e0d663412e19359df79bfa33d2 100644 (file)
@@ -387,10 +387,6 @@ int blkid_do_probe(blkid_probe pr)
                        blkid_probe_set_value(pr, "TYPE",
                                (unsigned char *) id->name,
                                strlen(id->name) + 1);
-               if ((pr->probreq & BLKID_PROBREQ_SECTYPE) && id->secname)
-                       blkid_probe_set_value(pr, "SEC_TYPE",
-                               (unsigned char *) id->secname,
-                               strlen(id->secname) + 1);
                if (pr->probreq & BLKID_PROBREQ_USAGE)
                        blkid_probe_set_usage(pr, id->usage);
 
index 7b5545ed3ba31b3fb65986fe86eded07ff0b0c5b..83c4a433baf55c8114a0592e72d00ac04d644151 100644 (file)
@@ -225,8 +225,13 @@ static void ext_get_info(blkid_probe pr, int ver, struct ext2_super_block *es)
 
        if (ver != 2 && (pr->probreq & BLKID_PROBREQ_SECTYPE) &&
            ((le32_to_cpu(es->s_feature_incompat) & EXT2_FEATURE_INCOMPAT_UNSUPPORTED) == 0))
-               blkid_probe_sprintf_version(pr, "%u.%u",
-                le32_to_cpu(es->s_rev_level), le16_to_cpu(es->s_minor_rev_level));
+               blkid_probe_set_value(pr, "SEC_TYPE",
+                               (unsigned char *) "ext2",
+                               sizeof("ext2"));
+
+       blkid_probe_sprintf_version(pr, "%u.%u",
+               le32_to_cpu(es->s_rev_level),
+               le16_to_cpu(es->s_minor_rev_level));
 }