From 9b0ab841856ed7168171f6dceaede88dc9fbb9b2 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 17 Aug 2009 09:43:18 +0200 Subject: [PATCH] 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. --- daemon/fallocate.c | 2 +- daemon/sfdisk.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/fallocate.c b/daemon/fallocate.c index eb84145..20a75e6 100644 --- a/daemon/fallocate.c +++ b/daemon/fallocate.c @@ -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; } diff --git a/daemon/sfdisk.c b/daemon/sfdisk.c index 6d49387..b68b9f6 100644 --- a/daemon/sfdisk.c +++ b/daemon/sfdisk.c @@ -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; } -- 1.8.3.1