1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvchange: add log_error for failure path

When change of monitoring fails, ensure there is log_error() printed.
This commit is contained in:
Zdenek Kabelac 2023-07-13 21:24:26 +02:00
parent cb2d32bdc4
commit 64b28e0839

View File

@ -156,8 +156,11 @@ static int _lvchange_monitoring(struct cmd_context *cmd,
log_verbose("Monitoring LV %s", display_lvname(lv));
else
log_verbose("Unmonitoring LV %s", display_lvname(lv));
if (!monitor_dev_for_events(cmd, lv, 0, dmeventd_monitor_mode()))
return_0;
if (!monitor_dev_for_events(cmd, lv, 0, dmeventd_monitor_mode())) {
log_error("Failed to change monitoring for %s volume.",
display_lvname(lv));
return 0;
}
}
return 1;