* [PATCH] Don't add 'p' delimiter when you shouldn't
@ 2012-01-09 3:08 Phillip Susi
2012-02-09 19:33 ` Phillip Susi
2012-02-09 20:17 ` Christophe Varoqui
0 siblings, 2 replies; 6+ messages in thread
From: Phillip Susi @ 2012-01-09 3:08 UTC (permalink / raw)
To: device-mapper development
[-- Attachment #1.1: Type: text/plain, Size: 989 bytes --]
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.
Index: b/kpartx/kpartx.c
===================================================================
--- a/kpartx/kpartx.c
+++ b/kpartx/kpartx.c
@@ -310,12 +310,6 @@
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) {
@@ -331,6 +325,12 @@
if (!mapname)
mapname = device + off;
+ if (delim == NULL) {
+ delim = malloc(DELIM_SIZE);
+ memset(delim, 0, DELIM_SIZE);
+ set_delimiter(mapname, delim);
+ }
+
fd = open(device, O_RDONLY);
if (fd == -1) {
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 554 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Don't add 'p' delimiter when you shouldn't
2012-01-09 3:08 [PATCH] Don't add 'p' delimiter when you shouldn't Phillip Susi
@ 2012-02-09 19:33 ` Phillip Susi
2012-02-09 20:17 ` Christophe Varoqui
1 sibling, 0 replies; 6+ messages in thread
From: Phillip Susi @ 2012-02-09 19:33 UTC (permalink / raw)
To: device-mapper development
Not heard anything back about this yet. Does anyone have any comments
or care to merge it?
On 1/8/2012 10:08 PM, Phillip Susi wrote:
> 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.
>
> Index: b/kpartx/kpartx.c
> ===================================================================
> --- a/kpartx/kpartx.c
> +++ b/kpartx/kpartx.c
> @@ -310,12 +310,6 @@
> 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) {
> @@ -331,6 +325,12 @@
> if (!mapname)
> mapname = device + off;
>
> + if (delim == NULL) {
> + delim = malloc(DELIM_SIZE);
> + memset(delim, 0, DELIM_SIZE);
> + set_delimiter(mapname, delim);
> + }
> +
> fd = open(device, O_RDONLY);
>
> if (fd == -1) {
>
>
>
>
> --
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Don't add 'p' delimiter when you shouldn't
2012-01-09 3:08 [PATCH] Don't add 'p' delimiter when you shouldn't Phillip Susi
2012-02-09 19:33 ` Phillip Susi
@ 2012-02-09 20:17 ` Christophe Varoqui
1 sibling, 0 replies; 6+ messages in thread
From: Christophe Varoqui @ 2012-02-09 20:17 UTC (permalink / raw)
To: device-mapper development
On dim., 2012-01-08 at 22:08 -0500, Phillip Susi wrote:
> 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.
Rebased and merged.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Don't add 'p' delimiter when you shouldn't
2013-01-08 7:04 ` Christophe Varoqui
@ 2013-01-08 14:20 ` Phillip Susi
0 siblings, 0 replies; 6+ messages in thread
From: Phillip Susi @ 2013-01-08 14:20 UTC (permalink / raw)
To: christophe.varoqui; +Cc: device-mapper development, Christophe Varoqui
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 1/8/2013 2:04 AM, Christophe Varoqui wrote:
> On lun., 2013-01-07 at 14:56 -0500, Phillip Susi wrote:
>> 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.
>>
> Isn't that already merged ?
>
> commit 02ce0e8f40f10c0d0c6ad15b3abd02cb43653879 Author: Phillip
> Susi <psusi@ubuntu.com> Date: Thu Feb 9 21:16:21 2012 +0100
Sorry, for some reason I was using
git://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-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Don't add 'p' delimiter when you shouldn't
2013-01-07 19:56 Phillip Susi
@ 2013-01-08 7:04 ` Christophe Varoqui
2013-01-08 14:20 ` Phillip Susi
0 siblings, 1 reply; 6+ messages in thread
From: Christophe Varoqui @ 2013-01-08 7:04 UTC (permalink / raw)
To: device-mapper development; +Cc: Phillip Susi
On lun., 2013-01-07 at 14:56 -0500, Phillip Susi wrote:
> 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.
>
Isn't that already merged ?
commit 02ce0e8f40f10c0d0c6ad15b3abd02cb43653879
Author: Phillip Susi <psusi@ubuntu.com>
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
> Signed-off-by: Phillip Susi <psusi@ubuntu.com>
> ---
> kpartx/kpartx.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
> index 0711450..08f3407 100644
> --- a/kpartx/kpartx.c
> +++ b/kpartx/kpartx.c
> @@ -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) {
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Don't add 'p' delimiter when you shouldn't
@ 2013-01-07 19:56 Phillip Susi
2013-01-08 7:04 ` Christophe Varoqui
0 siblings, 1 reply; 6+ messages in thread
From: Phillip Susi @ 2013-01-07 19:56 UTC (permalink / raw)
To: dm-devel; +Cc: 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-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.
Signed-off-by: Phillip Susi <psusi@ubuntu.com>
---
kpartx/kpartx.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
index 0711450..08f3407 100644
--- a/kpartx/kpartx.c
+++ b/kpartx/kpartx.c
@@ -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) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-08 14:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-09 3:08 [PATCH] Don't add 'p' delimiter when you shouldn't Phillip Susi
2012-02-09 19:33 ` Phillip Susi
2012-02-09 20:17 ` Christophe Varoqui
2013-01-07 19:56 Phillip Susi
2013-01-08 7:04 ` Christophe Varoqui
2013-01-08 14:20 ` Phillip Susi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.