[Dmraid-debian-commits] [SCM] Maintenance of the dmraid package branch, master, updated. debian/1.0.0.rc15-2-1-g748a001

Giuseppe Iuculano giuseppe at iuculano.it
Fri Mar 6 07:56:44 UTC 2009


The following commit has been merged in the master branch:
commit 748a00110906b0b7fedf2e7cab5d11699fd576aa
Author: Giuseppe Iuculano <giuseppe at iuculano.it>
Date:   Fri Mar 6 08:56:28 2009 +0100

    debian/patches/14_isw-serial-fix.patch: Change the serial number scan to only look at the LAST 16 bytes rather than the first. Thanks Sam Bingner (LP: #267953)

diff --git a/debian/patches/14_isw-serial-fix.patch b/debian/patches/14_isw-serial-fix.patch
new file mode 100644
index 0000000..aea5482
--- /dev/null
+++ b/debian/patches/14_isw-serial-fix.patch
@@ -0,0 +1,26 @@
+Author: Sam Bingner <sam at bingner.com>
+Description: Change the serial number scan to only look at the LAST 16 bytes rather than the first
+                (LP: #267953)
+--- a/1.0.0.rc15/lib/format/ataraid/isw.c
++++ b/1.0.0.rc15/lib/format/ataraid/isw.c
+@@ -84,12 +84,19 @@ is_raid10(struct isw_dev *dev)
+ static struct isw_disk *
+ _get_disk(struct isw *isw, struct dev_info *di)
+ {
++	int off;
++
+ 	if (di->serial) {
+ 		int i = isw->num_disks;
+ 		struct isw_disk *disk = isw->disk;
+ 
++		if(strlen(di->serial) > MAX_RAID_SERIAL_LEN)
++			off=strlen(di->serial) - MAX_RAID_SERIAL_LEN;
++		else
++			off=0;
++
+ 		while (i--) {
+-			if (!strncmp(di->serial, (const char *) disk[i].serial,
++			if (!strncmp(di->serial+off, (const char *) disk[i].serial,
+ 				     MAX_RAID_SERIAL_LEN))
+ 				return disk + i;
+ 		}
diff --git a/debian/patches/series b/debian/patches/series
index b1ac6d3..79fbaaf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@
 11_isw-raid10.patch
 12_support_virtio_devices.patch
 13_rm_partitions.patch
+14_isw-serial-fix.patch

-- 
Maintenance of the dmraid package



More information about the Dmraid-debian-commits mailing list