rpms/util-linux-ng/F-12 util-linux-ng-2.16-blkid-ataraid.patch, NONE, 1.1 util-linux-ng.spec, 1.68, 1.69
kzak
kzak at fedoraproject.org
Tue Dec 15 13:39:11 UTC 2009
Author: kzak
Update of /cvs/pkgs/rpms/util-linux-ng/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16513
Modified Files:
util-linux-ng.spec
Added Files:
util-linux-ng-2.16-blkid-ataraid.patch
Log Message:
* Tue Dec 15 2009 Karel Zak <kzak at redhat.com> 2.16.2-5
- fix #547245 - blkid does not recognize Adaptec HostRAID members
util-linux-ng-2.16-blkid-ataraid.patch:
adaptec_raid.c | 7 ++++---
highpoint_raid.c | 15 +++++++++++----
2 files changed, 15 insertions(+), 7 deletions(-)
--- NEW FILE util-linux-ng-2.16-blkid-ataraid.patch ---
diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probers/adaptec_raid.c.kzak util-linux-ng-2.16.2/shlibs/blkid/src/probers/adaptec_raid.c
--- util-linux-ng-2.16.2/shlibs/blkid/src/probers/adaptec_raid.c.kzak 2009-11-30 12:43:13.000000000 +0100
+++ util-linux-ng-2.16.2/shlibs/blkid/src/probers/adaptec_raid.c 2009-12-15 14:18:10.000000000 +0100
@@ -16,6 +16,7 @@
#include "blkidP.h"
struct adaptec_metadata {
+
uint32_t b0idcode;
uint8_t lunsave[8];
uint16_t sdtype;
@@ -63,13 +64,13 @@ struct adaptec_metadata {
uint32_t fwTestMagic;
uint32_t fwTestSeqNum;
uint8_t fwTestRes[8];
- uint8_t smagic[4];
+ uint32_t smagic;
uint32_t raidtbl;
uint16_t raidline;
uint8_t res9[0xF6];
} __attribute__((packed));
-#define AD_SIGNATURE "DPTM"
+#define AD_SIGNATURE 0x4450544D /* "DPTM" */
#define AD_MAGIC 0x37FC4D1E
static int probe_adraid(blkid_probe pr, const struct blkid_idmag *mag)
@@ -87,7 +88,7 @@ static int probe_adraid(blkid_probe pr,
sizeof(struct adaptec_metadata));
if (!ad)
return -1;
- if (memcmp(ad->smagic, AD_SIGNATURE, sizeof(AD_SIGNATURE)) != 0)
+ if (ad->smagic != be32_to_cpu(AD_SIGNATURE))
return -1;
if (ad->b0idcode != be32_to_cpu(AD_MAGIC))
return -1;
diff -up util-linux-ng-2.16.2/shlibs/blkid/src/probers/highpoint_raid.c.kzak util-linux-ng-2.16.2/shlibs/blkid/src/probers/highpoint_raid.c
--- util-linux-ng-2.16.2/shlibs/blkid/src/probers/highpoint_raid.c.kzak 2009-11-30 12:37:08.000000000 +0100
+++ util-linux-ng-2.16.2/shlibs/blkid/src/probers/highpoint_raid.c 2009-12-15 14:18:10.000000000 +0100
@@ -45,18 +45,25 @@ static int probe_highpoint45x(blkid_prob
}
const struct blkid_idinfo highpoint45x_idinfo = {
- .name = "highpoint_raid_member",
+ .name = "hpt45x_raid_member",
.usage = BLKID_USAGE_RAID,
.probefunc = probe_highpoint45x,
.magics = BLKID_NONE_MAGIC
};
const struct blkid_idinfo highpoint37x_idinfo = {
- .name = "highpoint_raid_member",
+ .name = "hpt37x_raid_member",
.usage = BLKID_USAGE_RAID,
.magics = {
- { .magic = "\xf0\x16\x78\x5a", .len = 4, .kboff = 4 },
- { .magic = "\xfd\x16\x78\x5a", .len = 4, .kboff = 4 },
+ /*
+ * Superblok offset: 4608 bytes (9 sectors)
+ * Magic string offset within superblock: 32 bytes
+ *
+ * kboff = (4608 + 32) / 1024
+ * sboff = (4608 + 32) % kboff
+ */
+ { .magic = "\xf0\x16\x78\x5a", .len = 4, .kboff = 4, .sboff = 544 },
+ { .magic = "\xfd\x16\x78\x5a", .len = 4, .kboff = 4, .sboff = 544 },
{ NULL }
}
};
Index: util-linux-ng.spec
===================================================================
RCS file: /cvs/pkgs/rpms/util-linux-ng/F-12/util-linux-ng.spec,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -p -r1.68 -r1.69
--- util-linux-ng.spec 10 Dec 2009 14:37:50 -0000 1.68
+++ util-linux-ng.spec 15 Dec 2009 13:39:10 -0000 1.69
@@ -2,7 +2,7 @@
Summary: A collection of basic system utilities
Name: util-linux-ng
Version: 2.16.2
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain
Group: System Environment/Base
URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng
@@ -111,6 +111,8 @@ Patch8: util-linux-ng-2.15-ipcs-32bit.pa
Patch9: util-linux-ng-2.16-blkid-crypto.patch
# 536797 - ntfs volume labels are not correct in hal
Patch10: util-linux-ng-2.16-blkid-ntfs.patch
+# 547245 - blkid does not recognize Adaptec HostRAID members
+Patch11: util-linux-ng-2.16-blkid-ataraid.patch
%description
The util-linux-ng package contains a large variety of low-level system
@@ -207,6 +209,7 @@ cp %{SOURCE8} %{SOURCE9} .
%patch8 -p1
%patch9 -p1
%patch10 -p1
+%patch11 -p1
%build
unset LINGUAS || :
@@ -717,6 +720,9 @@ fi
%changelog
+* Tue Dec 15 2009 Karel Zak <kzak at redhat.com> 2.16.2-5
+- fix #547245 - blkid does not recognize Adaptec HostRAID members
+
* Thu Dec 10 2009 Karel Zak <kzak at redhat.com> 2.16.2-4
- add Requires: libblkid and libuuid (bz#531992 comment #38)
More information about the scm-commits
mailing list