Patchwork multiboot: Quote filename in error message.

login
register
mail settings
Submitter Adam Lackorzynski
Date April 8, 2011, 6:48 a.m.
Message ID <1302245322-6908-1-git-send-email-adam@os.inf.tu-dresden.de>
Download mbox | patch
Permalink /patch/90265/
State New
Headers show

Comments

Adam Lackorzynski - April 8, 2011, 6:48 a.m.
Quote filename in error message to spot possible whitespace character in
the filename and make error message more meaningful.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
---
 hw/multiboot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Alexander Graf - April 8, 2011, 7:40 a.m.
Am 08.04.2011 um 08:48 schrieb Adam Lackorzynski <adam@os.inf.tu-dresden.de>:

> Quote filename in error message to spot possible whitespace character in
> the filename and make error message more meaningful.
> 
> Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>

Acked-by: Alexander Graf <agraf@suse.de>

Alex
Stefan Hajnoczi - April 8, 2011, 9:58 a.m.
On Fri, Apr 8, 2011 at 7:48 AM, Adam Lackorzynski
<adam@os.inf.tu-dresden.de> wrote:
> Quote filename in error message to spot possible whitespace character in
> the filename and make error message more meaningful.
>
> Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
> ---
>  hw/multiboot.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks!  Merged into the trivial patches tree at:
git://repo.or.cz/qemu/stefanha.git trivial-patches

A pull request will be sent to merge this into qemu.git.  For more info, see:
http://qemu.org/Contribute/TrivialPatches

Stefan

Patch

diff --git a/hw/multiboot.c b/hw/multiboot.c
index 0d2bfb4..394ed01 100644
--- a/hw/multiboot.c
+++ b/hw/multiboot.c
@@ -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 open file '%s'\n", initrd_filename);
                 exit(1);
             }