summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
index 01ac65e0..2b096703 100644
--- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
+++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
@@ -125,8 +125,8 @@ static int _extend(const char *device)
syslog(LOG_ERR, "Unable to determine VG name from %s.", device);
return 0;
}
- if (sizeof(cmd_str) <= snprintf(cmd_str, sizeof(cmd_str),
- "lvextend --use-policies %s/%s", vg, lv)) {
+ if (dm_snprintf(cmd_str, sizeof(cmd_str),
+ "lvextend --use-policies %s/%s", vg, lv) < 0) {
syslog(LOG_ERR, "Unable to form LVM command: Device name too long.");
return 0;
}