From 2d8e72ec70c5e13822c9d5a89e54bbdbc70bf25e Mon Sep 17 00:00:00 2001 From: Thomas Cort Date: Sat, 10 Aug 2013 12:47:35 -0400 Subject: [PATCH] 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 --- commands/loadramdisk/loadramdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }