device-mapper-multipath-0.4.9-32

Modified 0018-RH-remove-config-dups.patch
  * Made modified config remove original only if the vendor/product
    exactly match
This commit is contained in:
Benjamin Marzinski 2012-10-02 20:39:05 +00:00
parent bb04a893de
commit 67e579f751
2 changed files with 36 additions and 9 deletions

View File

@ -1,7 +1,7 @@
---
libmultipath/blacklist.c | 91 ++++++++++++++++++++++++-----------------------
libmultipath/config.c | 5 ++
2 files changed, 52 insertions(+), 44 deletions(-)
libmultipath/config.c | 16 ++++++--
2 files changed, 60 insertions(+), 47 deletions(-)
Index: multipath-tools-120821/libmultipath/blacklist.c
===================================================================
@ -116,15 +116,37 @@ Index: multipath-tools-120821/libmultipath/config.c
===================================================================
--- multipath-tools-120821.orig/libmultipath/config.c
+++ multipath-tools-120821/libmultipath/config.c
@@ -417,6 +417,11 @@ factorize_hwtable (vector hw, int n)
@@ -26,13 +26,16 @@
static int
hwe_strmatch (struct hwentry *hwe1, struct hwentry *hwe2)
{
- if (hwe1->vendor && hwe2->vendor && strcmp(hwe1->vendor, hwe2->vendor))
+ if ((!!(hwe1->vendor) != !!(hwe2->vendor)) ||
+ (hwe1->vendor && strcmp(hwe1->vendor, hwe2->vendor)))
return 1;
- if (hwe1->product && hwe2->product && strcmp(hwe1->product, hwe2->product))
+ if ((!!(hwe1->product) != !!(hwe2->product)) ||
+ (hwe1->product && strcmp(hwe1->product, hwe2->product)))
return 1;
- if (hwe1->revision && hwe2->revision && strcmp(hwe1->revision, hwe2->revision))
+ if ((!!(hwe1->revision) != !!(hwe2->revision)) ||
+ (hwe1->revision && strcmp(hwe1->revision, hwe2->revision)))
return 1;
return 0;
@@ -417,6 +420,13 @@ factorize_hwtable (vector hw, int n)
continue;
/* dup */
merge_hwe(hwe2, hwe1);
+ if (hwe_strmatch(hwe2, hwe1) == 0) {
+ vector_del_slot(hw, i);
+ free_hwe(hwe1);
+ n -= 1;
+ i -= 1;
+ j -= 1;
+ }
}
}
return 0;

View File

@ -1,7 +1,7 @@
Summary: Tools to manage multipath devices using device-mapper
Name: device-mapper-multipath
Version: 0.4.9
Release: 31%{?dist}
Release: 32%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://christophe.varoqui.free.fr/
@ -182,6 +182,11 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
%{_mandir}/man8/kpartx.8.gz
%changelog
* Tue Oct 2 2012 Benjamin Marzinski <bmarizns@redhat.com> 0.4.9-32
- Modified 0018-RH-remove-config-dups.patch
* Made modified config remove original only if the vendor/product
exactly match
* Thu Sep 27 2012 Benjamin Marzinski <bmarzins@redhat.com> 0.4.9-31
- Add 0014-RH-dm_reassign.patch
* Fix reassign_maps option