mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-30 10:50:34 +03:00
Use dm_snprintf
and fix differently signed comparation.
This commit is contained in:
parent
7e27d8f4db
commit
7e3042b541
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user