From c837830f6ac363c42d615e17e0f265ee929fadf8 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 8 Jul 2011 12:35:48 +0000 Subject: [PATCH] report which dev was not found --- daemons/dmeventd/libdevmapper-event.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/daemons/dmeventd/libdevmapper-event.c b/daemons/dmeventd/libdevmapper-event.c index 2a3545f0e..2cef2eb55 100644 --- a/daemons/dmeventd/libdevmapper-event.c +++ b/daemons/dmeventd/libdevmapper-event.c @@ -559,10 +559,19 @@ static struct dm_task *_get_device_info(const struct dm_event_handler *dmevh) } if (!info.exists) { - log_error("_get_device_info: device not found"); + log_error("_get_device_info: %s%s%s%.0d%s%.0d%s%s: device not found", + dmevh->uuid ? : "", + (!dmevh->uuid && dmevh->dev_name) ? dmevh->dev_name : "", + (!dmevh->uuid && !dmevh->dev_name && dmevh->major > 0) ? "(" : "", + (!dmevh->uuid && !dmevh->dev_name && dmevh->major > 0) ? dmevh->major : 0, + (!dmevh->uuid && !dmevh->dev_name && dmevh->major > 0) ? ":" : "", + (!dmevh->uuid && !dmevh->dev_name && dmevh->minor > 0) ? dmevh->minor : 0, + (!dmevh->uuid && !dmevh->dev_name && dmevh->major > 0) && dmevh->minor == 0 ? "0" : "", + (!dmevh->uuid && !dmevh->dev_name && dmevh->major > 0) ? ") " : ""); goto bad; } + return dmt; bad: