mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
sfdisk.c, fallocate.c: use a string literal as format
* daemon/fallocate.c (do_fallocate): Format was not a string literal. * daemon/sfdisk.c (sfdisk): Likewise.
This commit is contained in:
@@ -36,7 +36,7 @@ do_fallocate (const char *path, int len)
|
||||
fd = open (path, O_WRONLY | O_CREAT | O_TRUNC | O_NOCTTY, 0666);
|
||||
CHROOT_OUT;
|
||||
if (fd == -1) {
|
||||
reply_with_perror (path);
|
||||
reply_with_perror ("failed to open %s", path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,13 +72,13 @@ sfdisk (const char *device, int n, int cyls, int heads, int sectors,
|
||||
|
||||
fp = popen (buf, "w");
|
||||
if (fp == NULL) {
|
||||
reply_with_perror (buf);
|
||||
reply_with_perror ("failed to open pipe: %s", buf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; lines[i] != NULL; ++i) {
|
||||
if (fprintf (fp, "%s\n", lines[i]) < 0) {
|
||||
reply_with_perror (buf);
|
||||
reply_with_perror ("failed to write to pipe: %s", buf);
|
||||
pclose (fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user