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