From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: [Qemu-devel] [PATCH 0/3] qerror: proper errors for qmp_block_resize()
Date: Wed, 4 Jan 2012 17:38:20 +0000 [thread overview]
Message-ID: <1325698703-15370-1-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
The block resize command returns undefined errors if things go wrong. This is
bad since users will have no chance to understand what failed.
Patch 3 makes qmp_block_resize() use meaningful errors. We introduce new
qerrors for ENOMEDIUM and EACCES since nothing exists yet.
When doing this I noticed that qerror definitions and table entries are not in
alphabetical order as required by the comments in qerror.h and qerror.c.
That's not a surprise since there is no automated way to enforce this. I'm not
sure whether this requirement is useful or not in the first place, but felt
guilty creating more mess. So I've restored alphabetical order and added a
script to verify that the requirement is met in Patches 1 and 2.
Stefan Hajnoczi (3):
qerror: add check-qerror.sh to verify alphabetical order
qerror: restore alphabetical order over qerrors
block: use proper qerrors in qmp_block_resize
blockdev.c | 26 +++++++++----
qerror.c | 91 +++++++++++++++++++++++++---------------------
qerror.h | 78 +++++++++++++++++++++------------------
scripts/check-qerror.sh | 22 +++++++++++
4 files changed, 131 insertions(+), 86 deletions(-)
create mode 100755 scripts/check-qerror.sh
--
1.7.7.3
next reply other threads:[~2012-01-04 17:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-04 17:38 Stefan Hajnoczi [this message]
2012-01-04 17:38 ` [Qemu-devel] [PATCH 1/3] qerror: add check-qerror.sh to verify alphabetical order Stefan Hajnoczi
2012-01-04 17:38 ` [Qemu-devel] [PATCH 2/3] qerror: restore alphabetical order over qerrors Stefan Hajnoczi
2012-01-04 17:38 ` [Qemu-devel] [PATCH 3/3] block: use proper qerrors in qmp_block_resize Stefan Hajnoczi
2012-01-04 19:59 ` Luiz Capitulino
2012-01-04 22:21 ` Stefan Hajnoczi
2012-01-04 20:01 ` [Qemu-devel] [PATCH 0/3] qerror: proper errors for qmp_block_resize() Luiz Capitulino
2012-01-04 21: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=1325698703-15370-1-git-send-email-stefanha@linux.vnet.ibm.com \
--to=stefanha@linux.vnet.ibm.com \
--cc=lcapitulino@redhat.com \
--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).