]> sourceware.org Git - lvm2.git/commitdiff
Use dm_snprintf
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 8 Apr 2011 14:18:40 +0000 (14:18 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 8 Apr 2011 14:18:40 +0000 (14:18 +0000)
and fix differently signed comparation.

daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c

index 01ac65e060d92cd1ef159b743697ea7c88d2163d..2b09670388f4384a224e7edf72767ad625499025 100644 (file)
@@ -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;
        }
This page took 0.043851 seconds and 5 git commands to generate.