public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: prajnoha@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW_DM libdm/libdm-common.c
Date: Mon, 05 Mar 2012 12:45:00 -0000	[thread overview]
Message-ID: <20120305124544.26512.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha@sourceware.org	2012-03-05 12:45:43

Modified files:
	.              : WHATS_NEW_DM 
	libdm          : libdm-common.c 

Log message:
	Fix dm_task_get_name_unmangled to not unmangle already unmangled name.
	
	In 'auto' and 'hex' mode, these names are already unmangled on ioctl return.
	There's no point on trying to do that once again (actually it's a bug!).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.587&r2=1.588
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-common.c.diff?cvsroot=lvm2&r1=1.145&r2=1.146

--- LVM2/WHATS_NEW_DM	2012/03/05 12:43:03	1.587
+++ LVM2/WHATS_NEW_DM	2012/03/05 12:45:43	1.588
@@ -1,5 +1,6 @@
 Version 1.02.74 - 
 ================================
+  Fix dm_task_get_name_unmangled to not unmangle already unmangled name.
   Check whether device names are properly mangled on ioctl return.
   Deactivation of failed thin check on thin pool returns success.
 
--- LVM2/libdm/libdm-common.c	2012/03/05 12:43:03	1.145
+++ LVM2/libdm/libdm-common.c	2012/03/05 12:45:43	1.146
@@ -588,9 +588,14 @@
 	const char *s = dm_task_get_name(dmt);
 	char buf[DM_NAME_LEN];
 	char *rs = NULL;
-	int r;
+	int r = 0;
 
-	if ((r = unmangle_name(s, strlen(s), buf, sizeof(buf),
+	/*
+	 * Unless the mode used is 'none', the name
+	 * is *already* unmangled on ioctl return!
+	 */
+	if (dm_get_name_mangling_mode() == DM_STRING_MANGLING_NONE &&
+	    (r = unmangle_name(s, strlen(s), buf, sizeof(buf),
 			       dm_get_name_mangling_mode())) < 0)
 		log_error("Failed to unmangle device name \"%s\".", s);
 	else if (!(rs = r ? dm_strdup(buf) : dm_strdup(s)))


             reply	other threads:[~2012-03-05 12:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 12:45 prajnoha [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-02-28  8:36 prajnoha
2012-02-13 10:49 zkabelac
2012-02-08 11:07 zkabelac
2011-03-30 12:14 zkabelac
2010-08-03  7:56 prajnoha
2010-05-27 15:02 prajnoha
2009-09-25 18:08 agk

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=20120305124544.26512.qmail@sourceware.org \
    --to=prajnoha@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).