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