Blame SOURCES/0125-RHBZ-1153832-kpartx-delete.patch

ecd2a9
---
ecd2a9
 kpartx/kpartx.c |    4 ++--
ecd2a9
 1 file changed, 2 insertions(+), 2 deletions(-)
ecd2a9
ecd2a9
Index: multipath-tools-130222/kpartx/kpartx.c
ecd2a9
===================================================================
ecd2a9
--- multipath-tools-130222.orig/kpartx/kpartx.c
ecd2a9
+++ multipath-tools-130222/kpartx/kpartx.c
ecd2a9
@@ -409,7 +409,7 @@ main(int argc, char **argv){
ecd2a9
 			break;
ecd2a9
 
ecd2a9
 		case DELETE:
ecd2a9
-			for (j = n-1; j >= 0; j--) {
ecd2a9
+			for (j = MAXSLICES-1; j >= 0; j--) {
ecd2a9
 				if (safe_sprintf(partname, "%s%s%d",
ecd2a9
 					     mapname, delim, j+1)) {
ecd2a9
 					fprintf(stderr, "partname too small\n");
ecd2a9
@@ -417,7 +417,7 @@ main(int argc, char **argv){
ecd2a9
 				}
ecd2a9
 				strip_slash(partname);
ecd2a9
 
ecd2a9
-				if (!slices[j].size || !dm_map_present(partname))
ecd2a9
+				if (!dm_map_present(partname))
ecd2a9
 					continue;
ecd2a9
 
ecd2a9
 				if (!dm_simplecmd(DM_DEVICE_REMOVE, partname,