multiboot: Quote filename in error message.
PATCH 1/1 multiboot: Quote filename in error message.
Quote filename in error message to spot possible whitespace character in the filename.
--- hw/multiboot.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/multiboot.c +1 -1
@@ -272,7 +272,7 @@ int load_multiboot(void *fw_cfg,mb_debug ("multiboot loading module: %s\n" , initrd_filename); mb_mod_length =get_image_size (initrd_filename);if (mb_mod_length <0 ) { -fprintf (stderr,"failed to get %s image size\n" , initrd_filename); +fprintf (stderr,"failed to get image size of '%s'\n" , initrd_filename);exit (1 ); }
Signature · 1 line
1.7.4.1
Quoted 13 lines · Adam Lackorzynski
Quote filename in error message to spot possible whitespace character in the filename.
Signed-off-by Adam Lackorzynski <[email protected]>---
hw/multiboot.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)hw/multiboot.c +0
-0
hw/multiboot.c int load_multiboot(void *fw_cfg, · line 275
Quoted 5 lines
hw/multiboot.c +1
-1@@ -272,7 +272,7 @@ int load_multiboot(void *fw_cfg,mb_debug ("multiboot loading module: %s\n" , initrd_filename); mb_mod_length =get_image_size (initrd_filename);if (mb_mod_length <0 ) { -fprintf (stderr,"failed to get %s image size\n" , initrd_filename); +fprintf (stderr,"failed to get image size of '%s'\n" , initrd_filename);
I'd like to see something telling the user that the most likely reason is that the file isn't there :). It might even make sense to only say "Failed to open file '%s'".
Alex
Quoted 11 lines · Alexander Graf
Quoted 8 lines · Adam Lackorzynski
Quote filename in error message to spot possible whitespace character in the filename.
Signed-off-by Adam Lackorzynski <[email protected]>---
hw/multiboot.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 12 lines
hw/multiboot.c int load_multiboot(void *fw_cfg, · line 275
Quoted 10 lines
hw/multiboot.c +1
-1@@ -272,7 +272,7 @@ int load_multiboot(void *fw_cfg,mb_debug ("multiboot loading module: %s\n" , initrd_filename); mb_mod_length =get_image_size (initrd_filename);if (mb_mod_length <0 ) { -fprintf (stderr,"failed to get %s image size\n" , initrd_filename); +fprintf (stderr,"failed to get image size of '%s'\n" , initrd_filename);I'd like to see something telling the user that the most likely reason is that the file isn't there :). It might even make sense to only say "Failed to open file '%s'".
Looking at get_image_size() it's the right thing to do...
Adam
Signature · 2 lines
Adam [email protected] Lackorzynski http://os.inf.tu-dresden.de/~adam/