qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] multiboot: Quote filename in error message.
Date: Fri, 8 Apr 2011 08:48:51 +0200	[thread overview]
Message-ID: <20110408064851.GA5141@os.inf.tu-dresden.de> (raw)
In-Reply-To: <92C880AE-D547-4A8B-89AB-99ABF3BCE159@suse.de>


On Fri Apr 08, 2011 at 00:44:36 +0200, Alexander Graf wrote:
> 
> On 07.04.2011, at 20:22, Adam Lackorzynski wrote:
> 
> > Quote filename in error message to spot possible whitespace character in
> > the filename.
> > 
> > Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
> > ---
> > hw/multiboot.c |    2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/hw/multiboot.c b/hw/multiboot.c
> > index 0d2bfb4..6be6fa0 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 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
-- 
Adam                 adam@os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/

  reply	other threads:[~2011-04-08  6:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07 18:22 [Qemu-devel] [PATCH] multiboot: Quote filename in error message Adam Lackorzynski
2011-04-07 22:44 ` Alexander Graf
2011-04-08  6:48   ` Adam Lackorzynski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-04-08  6:48 Adam Lackorzynski
2011-04-08  9:58 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110408064851.GA5141@os.inf.tu-dresden.de \
    --to=adam@os.inf.tu-dresden.de \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).