From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiUoQ-0007Lr-IA for qemu-devel@nongnu.org; Wed, 04 Jan 2012 12:39:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RiUoP-0002KS-Ba for qemu-devel@nongnu.org; Wed, 04 Jan 2012 12:39:42 -0500 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:34001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiUoO-0002Jc-Vm for qemu-devel@nongnu.org; Wed, 04 Jan 2012 12:39:41 -0500 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Jan 2012 17:39:35 -0000 Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q04HdXfd2719790 for ; Wed, 4 Jan 2012 17:39:33 GMT Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q04HdXl3019305 for ; Wed, 4 Jan 2012 10:39:33 -0700 From: Stefan Hajnoczi Date: Wed, 4 Jan 2012 17:38:20 +0000 Message-Id: <1325698703-15370-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 0/3] qerror: proper errors for qmp_block_resize() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Luiz Capitulino 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