From: Thomas Cort Date: Sat, 10 Aug 2013 16:47:35 +0000 (-0400) Subject: loadramdisk: bug fix for bad fprintf() format X-Git-Tag: v3.3.0~840 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=1e70f9f0b392f7cff1679a4c029222e8400afbe5;p=minix.git loadramdisk: bug fix for bad fprintf() format An fprintf() has two %s formats but only one additional argument. Include the name of the device file in the fprintf() call to balance the arguments and format. Change-Id: I62e702cf0bc9935897c2f85b0acc3b62b41d654a --- diff --git a/commands/loadramdisk/loadramdisk.c b/commands/loadramdisk/loadramdisk.c index 60fcfeca8..679ce8b1f 100644 --- a/commands/loadramdisk/loadramdisk.c +++ b/commands/loadramdisk/loadramdisk.c @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) s= write(ramfd, buf, r); if (s != r) { - fprintf(stderr, "error writing to '%s': %s\n", + fprintf(stderr, "error writing to '%s': %s\n", RAM, s >= 0 ? "short write" : strerror(errno)); exit(1); }