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:
Jim Meyering
2009-08-17 09:43:18 +02:00
parent 29e7b9908e
commit 9b0ab84185
2 changed files with 3 additions and 3 deletions

View File

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

View File

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