summaryrefslogtreecommitdiffstats
path: root/libdm/ioctl
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2012-03-05 12:48:12 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2012-03-05 12:48:12 +0000
commitba428469e6b8546349f6acb293535b3e805a9313 (patch)
treeed7b129909b7b36f2b8e409aea60dc9670870abc /libdm/ioctl
parent4961c3b4afdf56852b3a06641845c73166d46f05 (diff)
downloadlvm2-ba428469e6b8546349f6acb293535b3e805a9313.tar.gz
lvm2-ba428469e6b8546349f6acb293535b3e805a9313.tar.xz
lvm2-ba428469e6b8546349f6acb293535b3e805a9313.zip
Check for multiple mangled names in auto mangling mode.
Auto mode can't deal with multiple mangled names. We can do that while working in hex mode, but in auto mode, this would lead to device name ambiguity.
Diffstat (limited to 'libdm/ioctl')
-rw-r--r--libdm/ioctl/libdm-iface.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
index 0e3dab5e..09116197 100644
--- a/libdm/ioctl/libdm-iface.c
+++ b/libdm/ioctl/libdm-iface.c
@@ -1559,6 +1559,9 @@ static int _do_dm_ioctl_unmangle_name(char *name)
if (mode == DM_STRING_MANGLING_NONE)
return 1;
+ if (!check_multiple_mangled_name_allowed(mode, name))
+ return_0;
+
if ((r = unmangle_name(name, DM_NAME_LEN, buf, sizeof(buf),
dm_get_name_mangling_mode())) < 0) {
log_debug("_do_dm_ioctl_unmangle_name: failed to "