From: Karel Zak Date: Tue, 23 Sep 2008 12:57:53 +0000 (+0200) Subject: blkid: fix ext2 SEC_TYPE X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5283b12e317c9a74147f59106c320d0548c5d7ee;p=util-linux blkid: fix ext2 SEC_TYPE Signed-off-by: Karel Zak --- diff --git a/libs/blkid/src/blkidP.h b/libs/blkid/src/blkidP.h index e32d7dcd..e5641d6b 100644 --- a/libs/blkid/src/blkidP.h +++ b/libs/blkid/src/blkidP.h @@ -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 */ diff --git a/libs/blkid/src/probe.c b/libs/blkid/src/probe.c index bbcc8be5..06a49bf8 100644 --- a/libs/blkid/src/probe.c +++ b/libs/blkid/src/probe.c @@ -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); diff --git a/libs/blkid/src/probers/ext.c b/libs/blkid/src/probers/ext.c index 7b5545ed..83c4a433 100644 --- a/libs/blkid/src/probers/ext.c +++ b/libs/blkid/src/probers/ext.c @@ -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)); }