device-mapper-multipath-0.4.9-39

Add 0031-RHBZ-882060-fix-null-strncmp.patch
This commit is contained in:
Benjamin Marzinski 2012-11-30 11:51:24 -06:00
parent 775d7c1eb9
commit 2aa6dff826
2 changed files with 72 additions and 1 deletions

View File

@ -0,0 +1,66 @@
---
libmultipath/discovery.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
Index: multipath-tools-120821/libmultipath/discovery.c
===================================================================
--- multipath-tools-120821.orig/libmultipath/discovery.c
+++ multipath-tools-120821/libmultipath/discovery.c
@@ -113,6 +113,7 @@ path_discovery (vector pathvec, struct c
udev_list_entry_foreach(entry,
udev_enumerate_get_list_entry(udev_iter)) {
+ const char *devtype;
devpath = udev_list_entry_get_name(entry);
condlog(4, "Discover device %s", devpath);
udevice = udev_device_new_from_syspath(conf->udev, devpath);
@@ -121,7 +122,8 @@ path_discovery (vector pathvec, struct c
r++;
continue;
}
- if(!strncmp(udev_device_get_devtype(udevice), "disk", 4))
+ devtype = udev_device_get_devtype(udevice);
+ if(devtype && !strncmp(devtype, "disk", 4))
r += path_discover(pathvec, conf, udevice, flag);
udev_device_unref(udevice);
}
@@ -459,7 +461,8 @@ scsi_sysfs_pathinfo (struct path * pp)
parent = pp->udev;
while (parent) {
- if (!strncmp(udev_device_get_subsystem(parent), "scsi", 4)) {
+ const char *subsys = udev_device_get_subsystem(parent);
+ if (subsys && !strncmp(subsys, "scsi", 4)) {
attr_path = udev_device_get_sysname(parent);
if (!attr_path)
break;
@@ -525,7 +528,8 @@ ccw_sysfs_pathinfo (struct path * pp)
parent = pp->udev;
while (parent) {
- if (!strncmp(udev_device_get_subsystem(parent), "ccw", 3))
+ const char *subsys = udev_device_get_subsystem(parent);
+ if (subsys && !strncmp(subsys, "ccw", 3))
break;
parent = udev_device_get_parent(parent);
}
@@ -581,7 +585,8 @@ cciss_sysfs_pathinfo (struct path * pp)
parent = pp->udev;
while (parent) {
- if (!strncmp(udev_device_get_subsystem(parent), "cciss", 5)) {
+ const char *subsys = udev_device_get_subsystem(parent);
+ if (subsys && !strncmp(subsys, "cciss", 5)) {
attr_path = udev_device_get_sysname(parent);
if (!attr_path)
break;
@@ -662,7 +667,8 @@ path_offline (struct path * pp)
parent = pp->udev;
while (parent) {
- if (!strncmp(udev_device_get_subsystem(parent), "scsi", 4))
+ const char *subsys = udev_device_get_subsystem(parent);
+ if (subsys && !strncmp(subsys, "scsi", 4))
break;
parent = udev_device_get_parent(parent);
}

View File

@ -1,7 +1,7 @@
Summary: Tools to manage multipath devices using device-mapper
Name: device-mapper-multipath
Version: 0.4.9
Release: 38%{?dist}
Release: 39%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://christophe.varoqui.free.fr/
@ -38,6 +38,7 @@ Patch0027: 0027-RH-default-partition-delimiters.patch
Patch0028: 0028-RH-storagetek-config.patch
Patch0029: 0029-RH-kpartx-retry.patch
Patch0030: 0030-RH-early-blacklist.patch
Patch0031: 0031-RHBZ-882060-fix-null-strncmp.patch
# runtime
Requires: %{name}-libs = %{version}-%{release}
@ -120,6 +121,7 @@ kpartx manages partition creation and removal for device-mapper devices.
%patch0028 -p1
%patch0029 -p1
%patch0030 -p1
%patch0031 -p1
cp %{SOURCE1} .
%build
@ -211,6 +213,9 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
%{_mandir}/man8/kpartx.8.gz
%changelog
* Fri Nov 30 2012 Benjamin Marzinski <bmarizns@redhat.com> 0.4.9-39
- Add 0031-RHBZ-882060-fix-null-strncmp.patch
* Fri Nov 30 2012 Benjamin Marzinski <bmarizns@redhat.com> 0.4.9-38
- Add 0026-RH-fix-mpathpersist-fns.patch
- Add 0027-RH-default-partition-delimiters.patch