qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/3] qerror: proper errors for qmp_block_resize(


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH 0/3] qerror: proper errors for qmp_block_resize()
Date: Wed, 4 Jan 2012 18:01:58 -0200

On Wed,  4 Jan 2012 17:38:20 +0000
Stefan Hajnoczi <address@hidden> wrote:

> The block resize command returns undefined errors if things go wrong.  This is
> bad since users will have no chance to understand what failed.

Oops, this introduces a segfault try "block_resize ide1-cd0 100" in the monitor
and you'll see it.

> 
> 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
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]