The partition_delimiter setting was effecitvely ignored. Fix it.
Fixes: 95bf339bb9d7 "correctly set partition delimiter on rename"
Signed-off-by: Martin Wilck <[email protected]>
---
libmultipath/devmapper.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index 3b41a483..e701e806 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -1351,10 +1351,12 @@ dm_rename_partmaps (const char * old, char * new, char
*delim)
if (delim)
rd.delim = delim;
- if (isdigit(new[strlen(new)-1]))
- rd.delim = "p";
- else
- rd.delim = "";
+ else {
+ if (isdigit(new[strlen(new)-1]))
+ rd.delim = "p";
+ else
+ rd.delim = "";
+ }
return do_foreach_partmaps(old, rename_partmap, &rd);
}
--
2.14.0
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel