Skip to contentSkip to conversation

LVM2/daemons/dmeventd/plugins/snapshot dmevent ...

PATCH [email protected] 1 participant 1 message Apr 8, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-04-08 14:18:40

Modified files:
daemons/dmeventd/plugins/snapshot: dmeventd_snapshot.c

Log message:
Use dm_snprintf

and fix differently signed comparation.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c.diff?cvsroot=lvm2&r1=1.14&r2=1.15

daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c +2 -2
@@ -125,8 +125,8 @@
 		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;
 	}