From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sym66-0004yG-Nf for qemu-devel@nongnu.org; Tue, 07 Aug 2012 11:53:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sym60-0005Vv-GE for qemu-devel@nongnu.org; Tue, 07 Aug 2012 11:53:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sym60-0005VH-8H for qemu-devel@nongnu.org; Tue, 07 Aug 2012 11:53:24 -0400 From: Luiz Capitulino Date: Tue, 7 Aug 2012 12:53:11 -0300 Message-Id: <1344354826-10375-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH v2 00/35]: add new error format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com, pbonzini@redhat.com, eblake@redhat.com v2 o rebase on top of master o fix linux-user build breakage o maintain DeviceEncrypted error and let hmp_change() use it o drop patch that changed inet_connect() and inet_connect_opts() to return -errno o Simplified tcp_start_outgoing_migration() error handling o use g_strdup_vprintf() (instead of vsnprintf() plus g_strdup()) o drop errors from command's documentation in qapi-schema.json o update docs/writing-qmp-commands.txt This series implements the 'Plan for error handling in QMP' as described by Anthony in this email: http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg03764.html Basically, this replaces almost all error classes by GenericError (the exception are a few error classes used by libvirt) and drops the error data memeber. This also adds a free form string to error_set(). On the wire, we go from: { "error": { "class": "DeviceNotRemovable", "data": { "device": "virtio0" }, "desc": "Device 'virtio0' is not removable" } } to: { "error": { "class": "GenericError", "desc": "Device 'virtio0' is not removable" } } Internally, we go from: void error_set(Error **err, const char *fmt, ...); to: void error_set(Error **err, ErrorClass err_class, const char *fmt, ...); Makefile.objs | 1 + QMP/qmp-spec.txt | 10 +- block.c | 1 + block_int.h | 1 + configure | 10 - docs/writing-qmp-commands.txt | 47 ++-- error.c | 93 +------- error.h | 34 +-- error_int.h | 29 --- hmp.c | 75 +++--- hmp.h | 1 + migration-tcp.c | 22 +- monitor.c | 83 ++----- nbd.c | 2 +- qapi-schema.json | 93 +++----- qapi/qmp-core.h | 1 + qapi/qmp-dispatch.c | 11 +- qemu-char.c | 2 +- qemu-ga.c | 5 +- qemu-sockets.c | 14 +- qemu_socket.h | 4 +- qerror.c | 516 ++---------------------------------------- qerror.h | 168 ++++++-------- qmp-commands.hx | 4 +- scripts/qapi-types.py | 17 +- ui/vnc.c | 2 +- 26 files changed, 272 insertions(+), 974 deletions(-)