1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00

Use dm_snprintf

and fix differently signed comparation.
This commit is contained in:
Zdenek Kabelac 2011-04-08 14:18:40 +00:00
parent 040cdff1d4
commit 6b7fe2852a

View 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;
}