From: Kevin Wolf <kwolf@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: amit.shah@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 10/10] block: print errno on error
Date: Wed, 03 Mar 2010 15:01:22 +0100 [thread overview]
Message-ID: <4B8E6BB2.7040606@redhat.com> (raw)
In-Reply-To: <92764ba73c7a75e8747b7a5a58a4a1ccb3d51489.1267617582.git.quintela@redhat.com>
Am 03.03.2010 13:07, schrieb Juan Quintela:
> Now that we changed all create calls to return errno, just print it.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> qemu-img.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/qemu-img.c b/qemu-img.c
> index 0c9f2d4..f6c40fb 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c
> @@ -374,7 +374,7 @@ static int img_create(int argc, char **argv)
> } else if (ret == -EFBIG) {
> error("The image size is too large for file format '%s'", fmt);
> } else {
> - error("Error while formatting");
> + error("Error (%s) while formatting for file format '%s'", strerror(ret), fmt);
> }
> }
> return 0;
> @@ -687,7 +687,7 @@ static int img_convert(int argc, char **argv)
> } else if (ret == -EFBIG) {
> error("The image size is too large for file format '%s'", out_fmt);
> } else {
> - error("Error while formatting '%s'", out_filename);
> + error("Error (%s) while formatting file '%s'", strerror(ret), out_filename);
> }
> }
>
I think it should be strerror(-ret) in both cases.
Kevin
next prev parent reply other threads:[~2010-03-03 14:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 12:06 [Qemu-devel] [PATCH 00/10] FORTIFY_SOURCE followup Juan Quintela
2010-03-03 12:06 ` [Qemu-devel] [PATCH 01/10] cow: return errno instead of -1 Juan Quintela
2010-03-03 12:06 ` [Qemu-devel] [PATCH 02/10] slirp: check system() success Juan Quintela
2010-03-03 12:06 ` [Qemu-devel] [PATCH 03/10] qcow2: return errno instead of -1 Juan Quintela
2010-03-03 12:06 ` [Qemu-devel] [PATCH 04/10] qcow: " Juan Quintela
2010-03-03 12:06 ` [Qemu-devel] [PATCH 05/10] vmdk: " Juan Quintela
2010-03-03 12:06 ` [Qemu-devel] [PATCH 06/10] vl: exit if we are not able to write into the pipe Juan Quintela
2010-03-03 13:51 ` [Qemu-devel] " Kevin Wolf
2010-03-03 14:00 ` Juan Quintela
2010-03-03 12:06 ` [Qemu-devel] [PATCH 07/10] vmdk: make vmdk_snapshot_create return -errno Juan Quintela
2010-03-03 12:06 ` [Qemu-devel] [PATCH 08/10] vmdk: fix double free Juan Quintela
2010-03-03 12:06 ` [Qemu-devel] [PATCH 09/10] vmdk: share cleanup code Juan Quintela
2010-03-03 12:07 ` [Qemu-devel] [PATCH 10/10] block: print errno on error Juan Quintela
2010-03-03 14:01 ` Kevin Wolf [this message]
2010-03-03 14:36 ` [Qemu-devel] " Paolo Bonzini
2010-03-03 16:21 ` Juan Quintela
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=4B8E6BB2.7040606@redhat.com \
--to=kwolf@redhat.com \
--cc=amit.shah@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).