[PATCH 16/16] Use mapname to choose kpartx delimiter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When kpartx creates partition devices, it uses the mapname as the base
for the partition device names. However when choosing the delimiter,
it uses the device name passed in.  So if kpartx is called on /dev/dm-X
it will always add a 'p', even if the mapname ends in a letter.  This
patch fixes that by setting the delimiter based on the mapname.

Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 kpartx/kpartx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
index 30b3bd9..98d88c0 100644
--- a/kpartx/kpartx.c
+++ b/kpartx/kpartx.c
@@ -348,7 +348,7 @@ main(int argc, char **argv){
 	if (delim == NULL) {
 		delim = malloc(DELIM_SIZE);
 		memset(delim, 0, DELIM_SIZE);
-		set_delimiter(device, delim);
+		set_delimiter(mapname, delim);
 	}
 
 	fd = open(device, O_RDONLY);
-- 
1.8.2

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux