Don't add 'p' delimiter when you shouldn't
PATCH 1/1 Don't add 'p' delimiter when you shouldn't
The 'p' delimiter is supposed to be added when the base disk name ends in a digit. This decision was based on the name given on the command line, not the canonical device name, so giving /dev/dm-0 instead of /dev/mapper/foo triggered the digit test and added the 'p'. Changed test to use the canonical name rather than the given name.
--- kpartx/kpartx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
kpartx/kpartx.c +6 -6
@@ -323,12 +323,6 @@ main(int argc, char **argv){ device = loopdev; } -if (delim ==NULL ) { - delim =malloc (DELIM_SIZE ); -memset (delim,0 ,DELIM_SIZE ); -set_delimiter (device, delim); - } - off =find_devname_offset (device);if (!loopdev) {
@@ -350,6 +344,12 @@ main(int argc, char **argv){return 0 ; } +if (delim ==NULL ) { + delim =malloc (DELIM_SIZE ); +memset (delim,0 ,DELIM_SIZE ); +set_delimiter (mapname, delim); + } + fd =open (device,O_RDONLY );if (fd ==-1 ) {
Signature · 1 line
1.7.9.5
Quoted 6 lines · Phillip Susi
The 'p' delimiter is supposed to be added when the base disk name ends in a digit. This decision was based on the name given on the command line, not the canonical device name, so giving
/dev/dm-0instead of/dev/mapper/footriggered the digit test and added the 'p'. Changed test to use the canonical name rather than the given name.
Isn't that already merged ?
commit 02ce0e8f40f10c0d0c6ad15b3abd02cb43653879
Author: Phillip Susi <[email protected]> Date: Thu Feb 9 21:16:21 2012 +0100
[kpartx] Don't add 'p' delimiter when you shouldn't
The 'p' delimiter is supposed to be added when the base disk name ends in a digit. This decision was based on the name given on the command line, not the canonical device name, so giving /dev/dm-0 instead of /dev/mapper/foo triggered the digit test and added the 'p'. Changed test to use the canonical name rather than the given name.
Regards,
Christophe Varoqui
www.opensvc.com
Quoted 35 lines
Signed-off-by Phillip Susi <[email protected]>--- kpartx/kpartx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)kpartx/kpartx.c +6
-6@@ -323,12 +323,6 @@ main(int argc, char **argv){ device = loopdev; } -if (delim ==NULL ) { - delim =malloc (DELIM_SIZE ); -memset (delim,0 ,DELIM_SIZE ); -set_delimiter (device, delim); - } - off =find_devname_offset (device);if (!loopdev) {@@ -350,6 +344,12 @@ main(int argc, char **argv){return 0 ; } +if (delim ==NULL ) { + delim =malloc (DELIM_SIZE ); +memset (delim,0 ,DELIM_SIZE ); +set_delimiter (mapname, delim); + } + fd =open (device,O_RDONLY );if (fd ==-1 ) {
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 8 lines · Christophe Varoqui
Quoted 7 lines · Phillip Susi
The 'p' delimiter is supposed to be added when the base disk name ends in a digit. This decision was based on the name given on the command line, not the canonical device name, so giving
/dev/dm-0instead of/dev/mapper/footriggered the digit test and added the 'p'. Changed test to use the canonical name rather than the given name.
Quoted 4 lines
Isn't that already merged ?
commit
02ce0e8f40f10c0d0c6ad15b3abd02cb43653879Author: Phillip
Susi <[email protected]> Date: Thu Feb 9 21:16:21 2012 +0100
Sorry, for some reason I was usinggit://git.kernel.org/pub/scm/linux/storage/multipath/hare/multipath-tools.git,
and it's out of date.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with undefined - http://www.enigmail.net/
iQEcBAEBAgAGBQJQ7CsWAAoJEJrBOlT6nu75jeUH/3sVO84wu+C2ua+ysziBES94 MWDb+SfCfYkvgQvob+W/PXaWL7/dkjTXPDj0ohCLsufYHw1kI58PZKnWSEZWI2Xa we/C49PZcdOrGI0EOi0PPdIgoX2tEtv5THk9Yo0M2H6I0CzvZ0R6s4+xd4aOMtvF LZR1C0jbtdcbF2gyd6mTqGD4jzH5z3wATYRbQUJahOTYS2t8Q1ROrekKst0bbB5c iXSTvJPZd9/f/sCsZa+rS1jKbI3NBMr51YvAr+i/i4akac9f7I//EC8iiOO3COBv k8IPspXYB0Myy0H3XG4vTPki+Juh3zK605BIoFGdCKnUAuQ5WSLcDV6X8bHvlWQ= =9Ozx
-----END PGP SIGNATURE-----