]> Zhao Yanbai Git Server - minix.git/commitdiff
loadramdisk: bug fix for bad fprintf() format 31/731/5
authorThomas Cort <tcort@minix3.org>
Sat, 10 Aug 2013 16:47:35 +0000 (12:47 -0400)
committerGerrit Code Review <gerrit@gerrit>
Thu, 15 Aug 2013 07:48:35 +0000 (09:48 +0200)
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

commands/loadramdisk/loadramdisk.c

index 60fcfeca82bc620566d7a79eca5ebb7ae587a792..679ce8b1f36d24f6cdedb3c25f50aab5898b4b9e 100644 (file)
@@ -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);
                }