1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +03:00

dmeventd: return error if device is not found

Do not return 'ok' status if we have failed to found device.
(Since it looks like the device is monitored)
This commit is contained in:
Zdenek Kabelac 2013-04-25 10:17:22 +02:00
parent 8d004b5127
commit a5ad1ee858
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.78 -
===================================
Report error for nonexisting devices in dmeventd communication.
Prevent double free error after dmeventd call of _fill_device_data().
Update dmevent structure message_data to simplify/fix error path handling.
Validate passed params to dm_get_status_raid/thin/thin_pool().

View File

@ -714,12 +714,15 @@ int dm_event_get_registered_device(struct dm_event_handler *dmevh, int next)
char *reply_dso = NULL, *reply_uuid = NULL;
enum dm_event_mask reply_mask = 0;
struct dm_task *dmt = NULL;
struct dm_event_daemon_message msg = { 0, 0, NULL };
struct dm_event_daemon_message msg = { 0 };
struct dm_info info;
if (!(dmt = _get_device_info(dmevh))) {
stack;
return 0;
log_debug("Device does not exists (uuid=%s, name=%s, %d:%d).",
dmevh->uuid, dmevh->dev_name,
dmevh->major, dmevh->minor);
ret = -ENODEV;
goto fail;
}
uuid = dm_task_get_uuid(dmt);