[util-linux-ng/f13/master] 2.17.2-10: improve libblkid RAIDs detection
kzak
kzak at fedoraproject.org
Wed Jan 12 14:12:06 UTC 2011
commit 21d35a521f7b62cc8988828ca5025c780304e089
Author: Karel Zak <kzak at redhat.com>
Date: Wed Jan 12 15:11:51 2011 +0100
2.17.2-10: improve libblkid RAIDs detection
Signed-off-by: Karel Zak <kzak at redhat.com>
util-linux-ng-2.17-blkid-raid.patch | 817 ++++++++++++++++++-----------------
util-linux-ng.spec | 5 +-
2 files changed, 424 insertions(+), 398 deletions(-)
---
diff --git a/util-linux-ng-2.17-blkid-raid.patch b/util-linux-ng-2.17-blkid-raid.patch
index 519e474..8d601b8 100644
--- a/util-linux-ng-2.17-blkid-raid.patch
+++ b/util-linux-ng-2.17-blkid-raid.patch
@@ -1,33 +1,62 @@
----
- misc-utils/blkid.c | 37 ++++----
- shlibs/blkid/src/blkidP.h | 11 ++
- shlibs/blkid/src/partitions/partitions.c | 92 +++++++++++++++++++++
- shlibs/blkid/src/probe.c | 102 ++++++++++++++++++++++--
- shlibs/blkid/src/superblocks/adaptec_raid.c | 7 +
- shlibs/blkid/src/superblocks/ddf_raid.c | 74 ++++++++++++++++-
- shlibs/blkid/src/superblocks/drbd.c | 13 ++-
- shlibs/blkid/src/superblocks/highpoint_raid.c | 14 +++
- shlibs/blkid/src/superblocks/isw_raid.c | 6 +
- shlibs/blkid/src/superblocks/jmicron_raid.c | 6 +
- shlibs/blkid/src/superblocks/linux_raid.c | 109 +++++++++++++++++++++-----
- shlibs/blkid/src/superblocks/lsi_raid.c | 6 +
- shlibs/blkid/src/superblocks/nvidia_raid.c | 7 +
- shlibs/blkid/src/superblocks/promise_raid.c | 9 +-
- shlibs/blkid/src/superblocks/silicon_raid.c | 9 +-
- shlibs/blkid/src/superblocks/superblocks.c | 68 +++++++++++-----
- shlibs/blkid/src/superblocks/superblocks.h | 2
- shlibs/blkid/src/superblocks/sysv.c | 14 +++
- shlibs/blkid/src/superblocks/ufs.c | 8 +
- shlibs/blkid/src/superblocks/via_raid.c | 6 +
- tests/expected/blkid/md-raid1-part | 58 +++++++++++++
- tests/expected/blkid/md-raid1-whole | 58 +++++++++++++
- tests/functions.sh | 2
- tests/ts/blkid/md-raid1-part | 92 +++++++++++++++++++++
- tests/ts/blkid/md-raid1-whole | 88 ++++++++++++++++++++
- 25 files changed, 816 insertions(+), 82 deletions(-)
-
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/blkidP.h
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/blkidP.h
+diff -up util-linux-ng-2.17.2/misc-utils/blkid.c.kzak util-linux-ng-2.17.2/misc-utils/blkid.c
+--- util-linux-ng-2.17.2/misc-utils/blkid.c.kzak 2011-01-12 14:54:53.000000000 +0100
++++ util-linux-ng-2.17.2/misc-utils/blkid.c 2011-01-12 14:54:53.000000000 +0100
+@@ -423,33 +423,34 @@ static int lowprobe_device(blkid_probe p
+
+ if (fstat(fd, &st))
+ goto done;
+- /*
+- * partitions probing
+- */
+- blkid_probe_enable_superblocks(pr, 0); /* enabled by default ;-( */
+
+ blkid_probe_enable_partitions(pr, 1);
+- rc = blkid_do_fullprobe(pr);
+- blkid_probe_enable_partitions(pr, 0);
+
+- if (rc < 0)
+- goto done; /* -1 = error, 1 = nothing, 0 = succes */
+-
+- /*
+- * Don't probe for FS/RAIDs on small devices
+- */
+- if (rc || S_ISCHR(st.st_mode) ||
+- blkid_probe_get_size(pr) > 1024 * 1440) {
++ if (!S_ISCHR(st.st_mode) && blkid_probe_get_size(pr) <= 1024 * 1440) {
+ /*
+- * filesystems/RAIDs probing
++ * check if the small disk is partitioned, if yes then
++ * don't probe for filesystems.
+ */
+- blkid_probe_enable_superblocks(pr, 1);
++ blkid_probe_enable_superblocks(pr, 0);
+
+- rc = blkid_do_safeprobe(pr);
++ rc = blkid_do_fullprobe(pr);
+ if (rc < 0)
+- goto done;
++ goto done; /* -1 = error, 1 = nothing, 0 = succes */
++
++ if (blkid_probe_lookup_value(pr, "PTTYPE", NULL, NULL) == 0)
++ /* partition table detected */
++ goto print_vals;
++
++ /* small whole-disk is unpartitioned, probe for filesystems only */
++ blkid_probe_enable_partitions(pr, 0);
+ }
+
++ blkid_probe_enable_superblocks(pr, 1);
++
++ rc = blkid_do_safeprobe(pr);
++ if (rc < 0)
++ goto done;
++print_vals:
+ nvals = blkid_probe_numof_values(pr);
+
+ if (output & OUTPUT_DEVICE_ONLY) {
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/blkidP.h.kzak util-linux-ng-2.17.2/shlibs/blkid/src/blkidP.h
+--- util-linux-ng-2.17.2/shlibs/blkid/src/blkidP.h.kzak 2011-01-12 14:54:53.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/blkidP.h 2011-01-12 14:54:53.000000000 +0100
@@ -192,10 +192,12 @@ struct blkid_struct_probe
blkid_loff_t size; /* end of data on the device */
@@ -74,8 +103,118 @@
extern void blkid_probe_chain_reset_vals(blkid_probe pr, struct blkid_chain *chn);
extern int blkid_probe_chain_copy_vals(blkid_probe pr, struct blkid_chain *chn,
struct blkid_prval *vals, int nvals);
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/probe.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/probe.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/partitions/partitions.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/partitions/partitions.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/partitions/partitions.c.kzak 2010-03-22 09:05:43.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/partitions/partitions.c 2011-01-12 14:57:34.000000000 +0100
+@@ -566,6 +566,9 @@ static int partitions_probe(blkid_probe
+ if (chn->binary)
+ partitions_init_data(pr, chn);
+
++ if (pr->prob_flags & BLKID_PARTS_IGNORE_PT)
++ return 1;
++
+ DBG(DEBUG_LOWPROBE,
+ printf("--> starting probing loop [PARTS idx=%d]\n",
+ chn->idx));
+@@ -652,6 +655,95 @@ int blkid_partitions_do_subprobe(blkid_p
+ return rc;
+ }
+
++/*
++ * This function is compatible with blkid_probe_get_partitions(), but the
++ * result is not stored in @pr and all probing is independent on the
++ * status of @pr. It's possible to call this function from arbitrary
++ * place without a care about @pr.
++ */
++static blkid_partlist blkid_probe_get_independent_partlist(blkid_probe pr)
++{
++
++ blkid_partlist ls = NULL, org_ls = NULL;
++ struct blkid_chain *chn = &pr->chains[BLKID_CHAIN_PARTS];
++ struct blkid_prval vals[BLKID_NVALS_PARTS];
++ int nvals = BLKID_NVALS_PARTS;
++ int idx;
++
++ /* save old results */
++ nvals = blkid_probe_chain_copy_vals(pr, chn, vals, nvals);
++ idx = chn->idx;
++ if (chn->data) {
++ org_ls = chn->data;
++ chn->data = NULL;
++ }
++
++ ls = blkid_probe_get_partitions(pr);
++
++ /* restore original results */
++ chn->data = org_ls;
++ chn->idx = idx;
++
++ blkid_probe_chain_reset_vals(pr, chn);
++ blkid_probe_append_vals(pr, vals, nvals);
++
++ return ls;
++}
++
++/*
++ * Returns 1 if the device is whole-disk and the area specified by @offset and
++ * @size is covered by any partition.
++ */
++int blkid_probe_is_covered_by_pt(blkid_probe pr,
++ blkid_loff_t offset, blkid_loff_t size)
++{
++ blkid_partlist ls = NULL;
++ blkid_loff_t start, end;
++ int nparts, i, rc = 0;
++
++ DBG(DEBUG_LOWPROBE, printf(
++ "=> checking if off=%jd size=%jd covered by PT\n",
++ offset, size));
++
++ ls = blkid_probe_get_independent_partlist(pr);
++ if (!ls)
++ goto done;
++
++ nparts = blkid_partlist_numof_partitions(ls);
++ if (!nparts)
++ goto done;
++
++ end = (offset + size) >> 9;
++ start = offset >> 9;
++
++ /* check if the partition table fits into the device */
++ for (i = 0; i < nparts; i++) {
++ blkid_partition par = &ls->parts[i];
++
++ if (par->start + par->size > (pr->size >> 9)) {
++ DBG(DEBUG_LOWPROBE, printf("partition #%d overflows "
++ "device (off=%lu size=%lu)\n",
++ par->partno, par->start, par->size));
++ goto done;
++ }
++ }
++
++ /* check if the requested area is covered by PT */
++ for (i = 0; i < nparts; i++) {
++ blkid_partition par = &ls->parts[i];
++
++ if (start >= par->start && end <= par->start + par->size) {
++ rc = 1;
++ break;
++ }
++ }
++done:
++ partitions_free_data(pr, (void *)ls);
++
++ DBG(DEBUG_LOWPROBE, printf("<= %s covered by PT\n", rc ? "IS" : "NOT"));
++ return rc;
++}
++
+ /**
+ * blkid_known_pttype:
+ * @pttype: partiton name
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/probe.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/probe.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/probe.c.kzak 2011-01-12 14:54:53.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/probe.c 2011-01-12 14:54:53.000000000 +0100
@@ -288,21 +288,33 @@ struct blkid_chain *blkid_probe_get_chai
void *blkid_probe_get_binary_data(blkid_probe pr, struct blkid_chain *chn)
@@ -270,169 +409,38 @@
* blkid_probe_get_size:
* @pr: probe
*
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/superblocks.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/superblocks.c
-@@ -375,8 +375,10 @@ static int superblocks_probe(blkid_probe
- /* final check by probing function */
- if (id->probefunc) {
- DBG(DEBUG_LOWPROBE, printf("\tcall probefunc()\n"));
-- if (id->probefunc(pr, mag) != 0)
-+ if (id->probefunc(pr, mag) != 0) {
-+ blkid_probe_chain_reset_vals(pr, chn);
- continue;
-+ }
- }
-
- /* all cheks passed */
-@@ -385,15 +387,11 @@ static int superblocks_probe(blkid_probe
- (unsigned char *) id->name,
- strlen(id->name) + 1);
-
-- if (chn->flags & BLKID_SUBLKS_USAGE)
-- blkid_probe_set_usage(pr, id->usage);
-+ blkid_probe_set_usage(pr, id->usage);
-
-- if (hasmag && (chn->flags & BLKID_SUBLKS_MAGIC)) {
-- blkid_probe_set_value(pr, "SBMAGIC",
-- (unsigned char *) mag->magic, mag->len);
-- blkid_probe_sprintf_value(pr, "SBMAGIC_OFFSET",
-- "%llu", off);
-- }
-+ if (hasmag)
-+ blkid_probe_set_magic(pr, off, mag->len,
-+ (unsigned char *) mag->magic);
-
- DBG(DEBUG_LOWPROBE,
- printf("<-- leaving probing loop (type=%s) [SUBLKS idx=%d]\n",
-@@ -435,20 +433,24 @@ static int superblocks_safeprobe(blkid_p
- /* floppy or so -- returns the first result. */
- return 0;
-
-- if (!count) {
-- /* save the first result */
-- nvals = blkid_probe_chain_copy_vals(pr, chn, vals, nvals);
-- idx = chn->idx;
-- }
- count++;
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/adaptec_raid.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/adaptec_raid.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/adaptec_raid.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/adaptec_raid.c 2011-01-12 14:54:53.000000000 +0100
+@@ -81,6 +81,9 @@ static int probe_adraid(blkid_probe pr,
+ if (pr->size < 0x10000)
+ return -1;
- if (idinfos[chn->idx]->usage & (BLKID_USAGE_RAID | BLKID_USAGE_CRYPTO))
- break;
-+
- if (!(idinfos[chn->idx]->flags & BLKID_IDINFO_TOLERANT))
- intol++;
-+
-+ if (count == 1) {
-+ /* save the first result */
-+ nvals = blkid_probe_chain_copy_vals(pr, chn, vals, nvals);
-+ idx = chn->idx;
-+ }
- }
-+
- if (rc < 0)
- return rc; /* error */
++ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
++ return -1;
+
- if (count > 1 && intol) {
- DBG(DEBUG_LOWPROBE,
- printf("ERROR: superblocks chain: "
-@@ -459,14 +461,40 @@ static int superblocks_safeprobe(blkid_p
- if (!count)
- return 1; /* nothing detected */
+ off = ((pr->size / 0x200)-1) * 0x200;
+ ad = (struct adaptec_metadata *)
+ blkid_probe_get_buffer(pr,
+@@ -94,7 +97,9 @@ static int probe_adraid(blkid_probe pr,
+ return -1;
+ if (blkid_probe_sprintf_version(pr, "%u", ad->resver) != 0)
+ return -1;
+-
++ if (blkid_probe_set_magic(pr, off, sizeof(ad->b0idcode),
++ (unsigned char *) &ad->b0idcode))
++ return -1;
+ return 0;
+ }
-- /* restore the first result */
-- blkid_probe_chain_reset_vals(pr, chn);
-- blkid_probe_append_vals(pr, vals, nvals);
-- chn->idx = idx;
-+ if (idx != -1) {
-+ /* restore the first result */
-+ blkid_probe_chain_reset_vals(pr, chn);
-+ blkid_probe_append_vals(pr, vals, nvals);
-+ chn->idx = idx;
-+ }
-+
-+ /*
-+ * The RAID device could be partitioned. The problem are RAID1 devices
-+ * where the partition table is visible from underlaying devices. We
-+ * have to ignore such partition tables.
-+ */
-+ if (chn->idx >= 0 && idinfos[chn->idx]->usage & BLKID_USAGE_RAID)
-+ pr->prob_flags |= BLKID_PARTS_IGNORE_PT;
-
- return 0;
- }
-
-+int blkid_probe_set_magic(blkid_probe pr, blkid_loff_t offset,
-+ size_t len, unsigned char *magic)
-+{
-+ int rc = 0;
-+ struct blkid_chain *chn = blkid_probe_get_chain(pr);
-+
-+ if (chn->flags & BLKID_SUBLKS_MAGIC) {
-+ if (magic && len)
-+ rc = blkid_probe_set_value(pr, "SBMAGIC", magic, len);
-+ if (!rc && offset)
-+ rc = blkid_probe_sprintf_value(pr, "SBMAGIC_OFFSET",
-+ "%llu", offset);
-+ }
-+ return rc;
-+}
-+
- int blkid_probe_set_version(blkid_probe pr, const char *version)
- {
- struct blkid_chain *chn = blkid_probe_get_chain(pr);
-@@ -494,8 +522,12 @@ int blkid_probe_sprintf_version(blkid_pr
-
- static int blkid_probe_set_usage(blkid_probe pr, int usage)
- {
-+ struct blkid_chain *chn = blkid_probe_get_chain(pr);
- char *u = NULL;
-
-+ if (!(chn->flags & BLKID_SUBLKS_USAGE))
-+ return 0;
-+
- if (usage & BLKID_USAGE_FILESYSTEM)
- u = "filesystem";
- else if (usage & BLKID_USAGE_RAID)
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/superblocks.h
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/superblocks.h
-@@ -68,6 +68,8 @@ extern const struct blkid_idinfo drbd_id
- /*
- * superblock functions
- */
-+extern int blkid_probe_set_magic(blkid_probe pr, blkid_loff_t offset,
-+ size_t len, unsigned char *magic);
- extern int blkid_probe_set_version(blkid_probe pr, const char *version);
- extern int blkid_probe_sprintf_version(blkid_probe pr, const char *fmt, ...)
- __attribute__ ((format (printf, 2, 3)));
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/adaptec_raid.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/adaptec_raid.c
-@@ -81,6 +81,9 @@ static int probe_adraid(blkid_probe pr,
- if (pr->size < 0x10000)
- return -1;
-
-+ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
-+ return -1;
-+
- off = ((pr->size / 0x200)-1) * 0x200;
- ad = (struct adaptec_metadata *)
- blkid_probe_get_buffer(pr,
-@@ -94,7 +97,9 @@ static int probe_adraid(blkid_probe pr,
- return -1;
- if (blkid_probe_sprintf_version(pr, "%u", ad->resver) != 0)
- return -1;
--
-+ if (blkid_probe_set_magic(pr, off, sizeof(ad->b0idcode),
-+ (unsigned char *) &ad->b0idcode))
-+ return -1;
- return 0;
- }
-
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/ddf_raid.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/ddf_raid.c
-@@ -18,12 +18,57 @@
- /* http://www.snia.org/standards/home */
- #define DDF_GUID_LENGTH 24
- #define DDF_REV_LENGTH 8
-+#define DDF_MAGIC 0xDE11DE11
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/ddf_raid.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/ddf_raid.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/ddf_raid.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/ddf_raid.c 2011-01-12 14:54:53.000000000 +0100
+@@ -18,12 +18,57 @@
+ /* http://www.snia.org/standards/home */
+ #define DDF_GUID_LENGTH 24
+ #define DDF_REV_LENGTH 8
++#define DDF_MAGIC 0xDE11DE11
+
struct ddf_header {
@@ -546,8 +554,9 @@
return 0;
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/drbd.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/drbd.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/drbd.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/drbd.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/drbd.c.kzak 2010-03-22 09:13:48.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/drbd.c 2011-01-12 14:54:53.000000000 +0100
@@ -14,6 +14,7 @@
#include <errno.h>
#include <ctype.h>
@@ -582,8 +591,9 @@
return 0;
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/highpoint_raid.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/highpoint_raid.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/highpoint_raid.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/highpoint_raid.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/highpoint_raid.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/highpoint_raid.c 2011-01-12 14:54:53.000000000 +0100
@@ -30,6 +30,8 @@ static int probe_highpoint45x(blkid_prob
if (pr->size < 0x10000)
@@ -622,8 +632,9 @@
.magics = {
/*
* Superblok offset: 4608 bytes (9 sectors)
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/isw_raid.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/isw_raid.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/isw_raid.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/isw_raid.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/isw_raid.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/isw_raid.c 2011-01-12 14:54:53.000000000 +0100
@@ -33,6 +33,8 @@ static int probe_iswraid(blkid_probe pr,
if (pr->size < 0x10000)
@@ -644,8 +655,9 @@
return 0;
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/jmicron_raid.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/jmicron_raid.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/jmicron_raid.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/jmicron_raid.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/jmicron_raid.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/jmicron_raid.c 2011-01-12 14:54:53.000000000 +0100
@@ -32,6 +32,8 @@ static int probe_jmraid(blkid_probe pr,
if (pr->size < 0x10000)
@@ -666,9 +678,10 @@
return 0;
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/linux_raid.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/linux_raid.c
-@@ -34,15 +34,68 @@ struct mdp0_super_block {
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/linux_raid.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/linux_raid.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/linux_raid.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/linux_raid.c 2011-01-12 15:05:11.000000000 +0100
+@@ -34,27 +34,82 @@ struct mdp0_super_block {
uint32_t set_uuid3;
};
@@ -743,15 +756,23 @@
#define MD_RESERVED_BYTES 0x10000
#define MD_SB_MAGIC 0xa92b4efc
-@@ -53,6 +106,7 @@ static int probe_raid0(blkid_probe pr, o
+-static int probe_raid0(blkid_probe pr, off_t off)
++static int probe_raid0(blkid_probe pr, blkid_loff_t off)
+ {
+ struct mdp0_super_block *mdp0;
+ union {
uint32_t ints[4];
uint8_t bytes[16];
} uuid;
+ uint32_t ma, mi, pa;
++ uint64_t size;
- if (pr->size < 0x10000)
+- if (pr->size < 0x10000)
++ if (pr->size < MD_RESERVED_BYTES)
return -1;
-@@ -72,11 +126,9 @@ static int probe_raid0(blkid_probe pr, o
+ mdp0 = (struct mdp0_super_block *)
+ blkid_probe_get_buffer(pr,
+@@ -72,11 +127,10 @@ static int probe_raid0(blkid_probe pr, o
uuid.ints[2] = swab32(mdp0->set_uuid2);
uuid.ints[3] = swab32(mdp0->set_uuid3);
}
@@ -763,10 +784,11 @@
+ ma = le32_to_cpu(mdp0->major_version);
+ mi = le32_to_cpu(mdp0->minor_version);
+ pa = le32_to_cpu(mdp0->patch_version);
++ size = le32_to_cpu(mdp0->size);
} else if (be32_to_cpu(mdp0->md_magic) == MD_SB_MAGIC) {
uuid.ints[0] = mdp0->set_uuid0;
-@@ -85,17 +137,29 @@ static int probe_raid0(blkid_probe pr, o
+@@ -85,17 +139,46 @@ static int probe_raid0(blkid_probe pr, o
uuid.ints[2] = mdp0->set_uuid2;
uuid.ints[3] = mdp0->set_uuid3;
}
@@ -778,20 +800,37 @@
+ ma = be32_to_cpu(mdp0->major_version);
+ mi = be32_to_cpu(mdp0->minor_version);
+ pa = be32_to_cpu(mdp0->patch_version);
++ size = be32_to_cpu(mdp0->size);
} else
- return -1;
+ return 1;
+
++ size <<= 10; /* convert KiB to bytes */
+
++ if (pr->size < size + MD_RESERVED_BYTES)
++ /* device is too small */
++ return 1;
++
++ if (off < size)
++ /* no space before superblock */
++ return 1;
++
+ /*
+ * Check for collisions between RAID and partition table
++ *
++ * For example the superblock is at the end of the last partition, it's
++ * the same possition as at the end of the disk...
+ */
+ if ((S_ISREG(pr->mode) || blkid_probe_is_wholedisk(pr)) &&
-+ blkid_probe_is_covered_by_pt(pr, off, 0x200)) {
++ blkid_probe_is_covered_by_pt(pr,
++ off - size, /* min. start */
++ size + MD_RESERVED_BYTES)) { /* min. length */
++
+ /* ignore this superblock, it's within any partition and
+ * we are working with whole-disk now */
+ return 1;
+ }
-
++
+ if (blkid_probe_sprintf_version(pr, "%u.%u.%u", ma, mi, pa) != 0)
+ return -1;
if (blkid_probe_set_uuid(pr, (unsigned char *) uuid.bytes) != 0)
@@ -803,7 +842,7 @@
return 0;
}
-@@ -113,12 +177,19 @@ static int probe_raid1(blkid_probe pr, o
+@@ -113,12 +196,19 @@ static int probe_raid1(blkid_probe pr, o
return -1;
if (le32_to_cpu(mdp1->major_version) != 1)
return -1;
@@ -824,8 +863,9 @@
return 0;
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/lsi_raid.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/lsi_raid.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/lsi_raid.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/lsi_raid.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/lsi_raid.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/lsi_raid.c 2011-01-12 14:54:53.000000000 +0100
@@ -30,6 +30,8 @@ static int probe_lsiraid(blkid_probe pr,
if (pr->size < 0x10000)
@@ -846,8 +886,9 @@
return 0;
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/nvidia_raid.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/nvidia_raid.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/nvidia_raid.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/nvidia_raid.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/nvidia_raid.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/nvidia_raid.c 2011-01-12 14:54:53.000000000 +0100
@@ -32,6 +32,8 @@ static int probe_nvraid(blkid_probe pr,
if (pr->size < 0x10000)
@@ -871,8 +912,9 @@
return 0;
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/promise_raid.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/promise_raid.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/promise_raid.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/promise_raid.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/promise_raid.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/promise_raid.c 2011-01-12 14:54:53.000000000 +0100
@@ -33,6 +33,8 @@ static int probe_pdcraid(blkid_probe pr,
if (pr->size < 0x40000)
@@ -897,8 +939,9 @@
}
return -1;
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/silicon_raid.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/silicon_raid.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/silicon_raid.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/silicon_raid.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/silicon_raid.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/silicon_raid.c 2011-01-12 14:54:53.000000000 +0100
@@ -15,6 +15,7 @@
#include <errno.h>
#include <ctype.h>
@@ -929,8 +972,144 @@
return 0;
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/sysv.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/sysv.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/superblocks.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/superblocks.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/superblocks.c.kzak 2011-01-12 14:54:53.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/superblocks.c 2011-01-12 14:54:53.000000000 +0100
+@@ -375,8 +375,10 @@ static int superblocks_probe(blkid_probe
+ /* final check by probing function */
+ if (id->probefunc) {
+ DBG(DEBUG_LOWPROBE, printf("\tcall probefunc()\n"));
+- if (id->probefunc(pr, mag) != 0)
++ if (id->probefunc(pr, mag) != 0) {
++ blkid_probe_chain_reset_vals(pr, chn);
+ continue;
++ }
+ }
+
+ /* all cheks passed */
+@@ -385,15 +387,11 @@ static int superblocks_probe(blkid_probe
+ (unsigned char *) id->name,
+ strlen(id->name) + 1);
+
+- if (chn->flags & BLKID_SUBLKS_USAGE)
+- blkid_probe_set_usage(pr, id->usage);
++ blkid_probe_set_usage(pr, id->usage);
+
+- if (hasmag && (chn->flags & BLKID_SUBLKS_MAGIC)) {
+- blkid_probe_set_value(pr, "SBMAGIC",
+- (unsigned char *) mag->magic, mag->len);
+- blkid_probe_sprintf_value(pr, "SBMAGIC_OFFSET",
+- "%llu", off);
+- }
++ if (hasmag)
++ blkid_probe_set_magic(pr, off, mag->len,
++ (unsigned char *) mag->magic);
+
+ DBG(DEBUG_LOWPROBE,
+ printf("<-- leaving probing loop (type=%s) [SUBLKS idx=%d]\n",
+@@ -435,20 +433,24 @@ static int superblocks_safeprobe(blkid_p
+ /* floppy or so -- returns the first result. */
+ return 0;
+
+- if (!count) {
+- /* save the first result */
+- nvals = blkid_probe_chain_copy_vals(pr, chn, vals, nvals);
+- idx = chn->idx;
+- }
+ count++;
+
+ if (idinfos[chn->idx]->usage & (BLKID_USAGE_RAID | BLKID_USAGE_CRYPTO))
+ break;
++
+ if (!(idinfos[chn->idx]->flags & BLKID_IDINFO_TOLERANT))
+ intol++;
++
++ if (count == 1) {
++ /* save the first result */
++ nvals = blkid_probe_chain_copy_vals(pr, chn, vals, nvals);
++ idx = chn->idx;
++ }
+ }
++
+ if (rc < 0)
+ return rc; /* error */
++
+ if (count > 1 && intol) {
+ DBG(DEBUG_LOWPROBE,
+ printf("ERROR: superblocks chain: "
+@@ -459,14 +461,40 @@ static int superblocks_safeprobe(blkid_p
+ if (!count)
+ return 1; /* nothing detected */
+
+- /* restore the first result */
+- blkid_probe_chain_reset_vals(pr, chn);
+- blkid_probe_append_vals(pr, vals, nvals);
+- chn->idx = idx;
++ if (idx != -1) {
++ /* restore the first result */
++ blkid_probe_chain_reset_vals(pr, chn);
++ blkid_probe_append_vals(pr, vals, nvals);
++ chn->idx = idx;
++ }
++
++ /*
++ * The RAID device could be partitioned. The problem are RAID1 devices
++ * where the partition table is visible from underlaying devices. We
++ * have to ignore such partition tables.
++ */
++ if (chn->idx >= 0 && idinfos[chn->idx]->usage & BLKID_USAGE_RAID)
++ pr->prob_flags |= BLKID_PARTS_IGNORE_PT;
+
+ return 0;
+ }
+
++int blkid_probe_set_magic(blkid_probe pr, blkid_loff_t offset,
++ size_t len, unsigned char *magic)
++{
++ int rc = 0;
++ struct blkid_chain *chn = blkid_probe_get_chain(pr);
++
++ if (chn->flags & BLKID_SUBLKS_MAGIC) {
++ if (magic && len)
++ rc = blkid_probe_set_value(pr, "SBMAGIC", magic, len);
++ if (!rc && offset)
++ rc = blkid_probe_sprintf_value(pr, "SBMAGIC_OFFSET",
++ "%llu", offset);
++ }
++ return rc;
++}
++
+ int blkid_probe_set_version(blkid_probe pr, const char *version)
+ {
+ struct blkid_chain *chn = blkid_probe_get_chain(pr);
+@@ -494,8 +522,12 @@ int blkid_probe_sprintf_version(blkid_pr
+
+ static int blkid_probe_set_usage(blkid_probe pr, int usage)
+ {
++ struct blkid_chain *chn = blkid_probe_get_chain(pr);
+ char *u = NULL;
+
++ if (!(chn->flags & BLKID_SUBLKS_USAGE))
++ return 0;
++
+ if (usage & BLKID_USAGE_FILESYSTEM)
+ u = "filesystem";
+ else if (usage & BLKID_USAGE_RAID)
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/superblocks.h.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/superblocks.h
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/superblocks.h.kzak 2010-03-22 09:05:43.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/superblocks.h 2011-01-12 14:54:53.000000000 +0100
+@@ -68,6 +68,8 @@ extern const struct blkid_idinfo drbd_id
+ /*
+ * superblock functions
+ */
++extern int blkid_probe_set_magic(blkid_probe pr, blkid_loff_t offset,
++ size_t len, unsigned char *magic);
+ extern int blkid_probe_set_version(blkid_probe pr, const char *version);
+ extern int blkid_probe_sprintf_version(blkid_probe pr, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/sysv.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/sysv.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/sysv.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/sysv.c 2011-01-12 14:54:53.000000000 +0100
@@ -12,6 +12,7 @@
#include <stdlib.h>
#include <unistd.h>
@@ -959,8 +1138,9 @@
return 0;
}
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/ufs.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/ufs.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/ufs.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/ufs.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/ufs.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/ufs.c 2011-01-12 14:54:53.000000000 +0100
@@ -15,6 +15,7 @@
#include <errno.h>
#include <ctype.h>
@@ -983,8 +1163,9 @@
return 0;
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/superblocks/via_raid.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/via_raid.c
+diff -up util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/via_raid.c.kzak util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/via_raid.c
+--- util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/via_raid.c.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/shlibs/blkid/src/superblocks/via_raid.c 2011-01-12 14:54:53.000000000 +0100
@@ -52,6 +52,8 @@ static int probe_viaraid(blkid_probe pr,
if (pr->size < 0x10000)
@@ -1005,171 +1186,9 @@
return 0;
}
---- util-linux-ng-2.17.2.orig/shlibs/blkid/src/partitions/partitions.c
-+++ util-linux-ng-2.17.2/shlibs/blkid/src/partitions/partitions.c
-@@ -566,6 +566,9 @@ static int partitions_probe(blkid_probe
- if (chn->binary)
- partitions_init_data(pr, chn);
-
-+ if (pr->prob_flags & BLKID_PARTS_IGNORE_PT)
-+ return 1;
-+
- DBG(DEBUG_LOWPROBE,
- printf("--> starting probing loop [PARTS idx=%d]\n",
- chn->idx));
-@@ -652,6 +655,95 @@ int blkid_partitions_do_subprobe(blkid_p
- return rc;
- }
-
-+/*
-+ * This function is compatible with blkid_probe_get_partitions(), but the
-+ * result is not stored in @pr and all probing is independent on the
-+ * status of @pr. It's possible to call this function from arbitrary
-+ * place without a care about @pr.
-+ */
-+static blkid_partlist blkid_probe_get_independent_partlist(blkid_probe pr)
-+{
-+
-+ blkid_partlist ls = NULL, org_ls = NULL;
-+ struct blkid_chain *chn = &pr->chains[BLKID_CHAIN_PARTS];
-+ struct blkid_prval vals[BLKID_NVALS_PARTS];
-+ int nvals = BLKID_NVALS_PARTS;
-+ int idx;
-+
-+ /* save old results */
-+ nvals = blkid_probe_chain_copy_vals(pr, chn, vals, nvals);
-+ idx = chn->idx;
-+ if (chn->data) {
-+ org_ls = chn->data;
-+ chn->data = NULL;
-+ }
-+
-+ ls = blkid_probe_get_partitions(pr);
-+
-+ /* restore original results */
-+ chn->data = org_ls;
-+ chn->idx = idx;
-+
-+ blkid_probe_chain_reset_vals(pr, chn);
-+ blkid_probe_append_vals(pr, vals, nvals);
-+
-+ return ls;
-+}
-+
-+/*
-+ * Returns 1 if the device is whole-disk and the area specified by @offset and
-+ * @size is covered by any partition.
-+ */
-+int blkid_probe_is_covered_by_pt(blkid_probe pr,
-+ blkid_loff_t offset, blkid_loff_t size)
-+{
-+ blkid_partlist ls = NULL;
-+ blkid_loff_t start, end;
-+ int nparts, i, rc = 0;
-+
-+ DBG(DEBUG_LOWPROBE, printf(
-+ "=> checking if off=%jd size=%jd covered by PT\n",
-+ offset, size));
-+
-+ ls = blkid_probe_get_independent_partlist(pr);
-+ if (!ls)
-+ goto done;
-+
-+ nparts = blkid_partlist_numof_partitions(ls);
-+ if (!nparts)
-+ goto done;
-+
-+ end = (offset + size) >> 9;
-+ start = offset >> 9;
-+
-+ /* check if the partition table fits into the device */
-+ for (i = 0; i < nparts; i++) {
-+ blkid_partition par = &ls->parts[i];
-+
-+ if (par->start + par->size > pr->size) {
-+ DBG(DEBUG_LOWPROBE, printf("partition #%d overflows "
-+ "device (off=%lu size=%lu)\n",
-+ par->partno, par->start, par->size));
-+ goto done;
-+ }
-+ }
-+
-+ /* check if the requested area is covered by PT */
-+ for (i = 0; i < nparts; i++) {
-+ blkid_partition par = &ls->parts[i];
-+
-+ if (start >= par->start && end <= par->start + par->size) {
-+ rc = 1;
-+ break;
-+ }
-+ }
-+done:
-+ partitions_free_data(pr, (void *)ls);
-+
-+ DBG(DEBUG_LOWPROBE, printf("<= %s covered by PT\n", rc ? "IS" : "NOT"));
-+ return rc;
-+}
-+
- /**
- * blkid_known_pttype:
- * @pttype: partiton name
---- util-linux-ng-2.17.2.orig/misc-utils/blkid.c
-+++ util-linux-ng-2.17.2/misc-utils/blkid.c
-@@ -423,33 +423,34 @@ static int lowprobe_device(blkid_probe p
-
- if (fstat(fd, &st))
- goto done;
-- /*
-- * partitions probing
-- */
-- blkid_probe_enable_superblocks(pr, 0); /* enabled by default ;-( */
-
- blkid_probe_enable_partitions(pr, 1);
-- rc = blkid_do_fullprobe(pr);
-- blkid_probe_enable_partitions(pr, 0);
-
-- if (rc < 0)
-- goto done; /* -1 = error, 1 = nothing, 0 = succes */
--
-- /*
-- * Don't probe for FS/RAIDs on small devices
-- */
-- if (rc || S_ISCHR(st.st_mode) ||
-- blkid_probe_get_size(pr) > 1024 * 1440) {
-+ if (!S_ISCHR(st.st_mode) && blkid_probe_get_size(pr) <= 1024 * 1440) {
- /*
-- * filesystems/RAIDs probing
-+ * check if the small disk is partitioned, if yes then
-+ * don't probe for filesystems.
- */
-- blkid_probe_enable_superblocks(pr, 1);
-+ blkid_probe_enable_superblocks(pr, 0);
-
-- rc = blkid_do_safeprobe(pr);
-+ rc = blkid_do_fullprobe(pr);
- if (rc < 0)
-- goto done;
-+ goto done; /* -1 = error, 1 = nothing, 0 = succes */
-+
-+ if (blkid_probe_lookup_value(pr, "PTTYPE", NULL, NULL) == 0)
-+ /* partition table detected */
-+ goto print_vals;
-+
-+ /* small whole-disk is unpartitioned, probe for filesystems only */
-+ blkid_probe_enable_partitions(pr, 0);
- }
-
-+ blkid_probe_enable_superblocks(pr, 1);
-+
-+ rc = blkid_do_safeprobe(pr);
-+ if (rc < 0)
-+ goto done;
-+print_vals:
- nvals = blkid_probe_numof_values(pr);
-
- if (output & OUTPUT_DEVICE_ONLY) {
---- /dev/null
-+++ util-linux-ng-2.17.2/tests/expected/blkid/md-raid1-part
+diff -up util-linux-ng-2.17.2/tests/expected/blkid/md-raid1-part.kzak util-linux-ng-2.17.2/tests/expected/blkid/md-raid1-part
+--- util-linux-ng-2.17.2/tests/expected/blkid/md-raid1-part.kzak 2011-01-12 14:54:53.000000000 +0100
++++ util-linux-ng-2.17.2/tests/expected/blkid/md-raid1-part 2011-01-12 14:54:53.000000000 +0100
@@ -0,0 +1,58 @@
+Create partitions
+Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
@@ -1229,8 +1248,9 @@
+
+
+ID_FS_VERSION=0.90.0
---- /dev/null
-+++ util-linux-ng-2.17.2/tests/expected/blkid/md-raid1-whole
+diff -up util-linux-ng-2.17.2/tests/expected/blkid/md-raid1-whole.kzak util-linux-ng-2.17.2/tests/expected/blkid/md-raid1-whole
+--- util-linux-ng-2.17.2/tests/expected/blkid/md-raid1-whole.kzak 2011-01-12 14:54:53.000000000 +0100
++++ util-linux-ng-2.17.2/tests/expected/blkid/md-raid1-whole 2011-01-12 14:54:53.000000000 +0100
@@ -0,0 +1,58 @@
+Initialize devices
+Create RAID device
@@ -1290,8 +1310,9 @@
+ID_FS_VERSION=0.90.0
+Stop RAID device
+Deinitialize devices
---- util-linux-ng-2.17.2.orig/tests/functions.sh
-+++ util-linux-ng-2.17.2/tests/functions.sh
+diff -up util-linux-ng-2.17.2/tests/functions.sh.kzak util-linux-ng-2.17.2/tests/functions.sh
+--- util-linux-ng-2.17.2/tests/functions.sh.kzak 2010-03-18 23:11:23.000000000 +0100
++++ util-linux-ng-2.17.2/tests/functions.sh 2011-01-12 14:54:53.000000000 +0100
@@ -256,7 +256,7 @@ function ts_image_init {
function ts_device_init {
@@ -1301,8 +1322,9 @@
if [ -z "$dev" ]; then
ts_device_deinit $dev
---- /dev/null
-+++ util-linux-ng-2.17.2/tests/ts/blkid/md-raid1-part
+diff -up util-linux-ng-2.17.2/tests/ts/blkid/md-raid1-part.kzak util-linux-ng-2.17.2/tests/ts/blkid/md-raid1-part
+--- util-linux-ng-2.17.2/tests/ts/blkid/md-raid1-part.kzak 2011-01-12 14:54:53.000000000 +0100
++++ util-linux-ng-2.17.2/tests/ts/blkid/md-raid1-part 2011-01-12 14:54:53.000000000 +0100
@@ -0,0 +1,92 @@
+#!/bin/bash
+
@@ -1396,8 +1418,9 @@
+sed -i -e 's/ID_FS_UUID.*//g' $TS_OUTPUT
+
+ts_finalize
---- /dev/null
-+++ util-linux-ng-2.17.2/tests/ts/blkid/md-raid1-whole
+diff -up util-linux-ng-2.17.2/tests/ts/blkid/md-raid1-whole.kzak util-linux-ng-2.17.2/tests/ts/blkid/md-raid1-whole
+--- util-linux-ng-2.17.2/tests/ts/blkid/md-raid1-whole.kzak 2011-01-12 14:54:53.000000000 +0100
++++ util-linux-ng-2.17.2/tests/ts/blkid/md-raid1-whole 2011-01-12 14:54:53.000000000 +0100
@@ -0,0 +1,88 @@
+#!/bin/bash
+
diff --git a/util-linux-ng.spec b/util-linux-ng.spec
index 861faf4..ee9dca0 100644
--- a/util-linux-ng.spec
+++ b/util-linux-ng.spec
@@ -2,7 +2,7 @@
Summary: A collection of basic system utilities
Name: util-linux-ng
Version: 2.17.2
-Release: 9%{?dist}
+Release: 10%{?dist}
License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain
Group: System Environment/Base
URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng
@@ -743,6 +743,9 @@ fi
%changelog
+* Wed Jan 12 2011 Karel Zak <kzak at redhat.com> 2.17.2-10
+- improve libblkid RAIDs detection (#543749)
+
* Mon Oct 11 2010 Karel Zak <kzak at redhat.com> 2.17.2-9
* fix #538551 - Dual-filesystem (ISO9660/HFS) CD-ROMs not mounted automatically
More information about the scm-commits
mailing list