From 5d0e7fb4edbe2c4e999eaa6210b6c9e25bdd5e91 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 29 Jun 2012 10:18:28 +0200 Subject: [PATCH] activation: report error message If the monitoring activation failed and we have not yet reported error - give the user error message for failure reason. --- lib/activate/activate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/activate/activate.c b/lib/activate/activate.c index 512adcf8c..185ba5fe3 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -1391,6 +1391,9 @@ int monitor_dev_for_events(struct cmd_context *cmd, struct logical_volume *lv, r = (monitored && monitor) || (!monitored && !monitor); } + if (!r && !error_message_produced()) + log_error("%sonitoring %s/%s failed.", monitor ? "M" : "Not m", + lv->vg->name, lv->name); return r; #else return 1;