From: Christophe Varoqui <christophe.varoqui@gmail.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Phillip Susi <psusi@ubuntu.com>
Subject: Re: [PATCH] Don't add 'p' delimiter when you shouldn't
Date: Tue, 08 Jan 2013 08:04:59 +0100 [thread overview]
Message-ID: <1357628699.3819.4.camel@lapoo.opensvc.com> (raw)
In-Reply-To: <1357588581-29831-1-git-send-email-psusi@ubuntu.com>
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) {
next prev parent reply other threads:[~2013-01-08 7:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 19:56 [PATCH] Don't add 'p' delimiter when you shouldn't Phillip Susi
2013-01-08 7:04 ` Christophe Varoqui [this message]
2013-01-08 14:20 ` Phillip Susi
-- strict thread matches above, loose matches on Subject: below --
2012-01-09 3:08 Phillip Susi
2012-02-09 19:33 ` Phillip Susi
2012-02-09 20:17 ` Christophe Varoqui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1357628699.3819.4.camel@lapoo.opensvc.com \
--to=christophe.varoqui@gmail.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.com \
--cc=psusi@ubuntu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.