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