summaryrefslogtreecommitdiffstats
path: root/daemons/dmeventd
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2010-04-14 13:01:38 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2010-04-14 13:01:38 +0000
commitbda398201640b2d2b0127875630b265c3d1dbd44 (patch)
tree325b5b8cf45df9f2a334e6c2814235a3a7430529 /daemons/dmeventd
parentcb296d5bb54f3a5905384d9198bd3276f053d6d0 (diff)
downloadlvm2-bda398201640b2d2b0127875630b265c3d1dbd44.tar.gz
lvm2-bda398201640b2d2b0127875630b265c3d1dbd44.tar.xz
lvm2-bda398201640b2d2b0127875630b265c3d1dbd44.zip
Use UUIDs instead of names while processing event handlers.
Internally, we used DM names instead of UUIDs while processing event handlers. This caused problems while trying to vgrename a VG with active LVs where the names are being changed and so the devices were not found then. The patch also contains a little bit of refactoring, moving "build_dlid" code found in dev_manager.c to "build_dm_uuid", now in lvm-string.c (so we have build_dm_uuid and build_dm_name at one place).
Diffstat (limited to 'daemons/dmeventd')
-rw-r--r--daemons/dmeventd/libdevmapper-event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemons/dmeventd/libdevmapper-event.c b/daemons/dmeventd/libdevmapper-event.c
index 115622dc..222be1ec 100644
--- a/daemons/dmeventd/libdevmapper-event.c
+++ b/daemons/dmeventd/libdevmapper-event.c
@@ -113,7 +113,7 @@ int dm_event_handler_set_uuid(struct dm_event_handler *dmevh, const char *uuid)
_dm_event_handler_clear_dev_info(dmevh);
dmevh->uuid = dm_strdup(uuid);
- if (!dmevh->dev_name)
+ if (!dmevh->uuid)
return -ENOMEM;
return 0;
}