Re: [Qemu-devel] [PATCH v3 00/35]: add new error format
On Sat, 11 Aug 2012 09:05:33 +0200 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: [...] 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, ...); Glad to see this change in good shape in time for the release. Thanks, Luiz! Thank you for your review! Reviewed-by: Markus Armbruster arm...@redhat.com
Re: [Qemu-devel] [PATCH v3 00/35]: add new error format
Luiz Capitulino lcapitul...@redhat.com writes: [...] 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, ...); Glad to see this change in good shape in time for the release. Thanks, Luiz! Reviewed-by: Markus Armbruster arm...@redhat.com
[Qemu-devel] [PATCH v3 00/35]: add new error format
v3 o rebase on top of master o replace 'valid_encryption_key' with 'encryption_key_missing', fixes a bug found by Markus o minor changes (changelogs, white-space fix and others) Only the following patches have changed: o [PATCH 11/35] qmp: query-block: add 'encryption_key_missing' field o [PATCH 12/35] hmp: hmp_cont(): don't rely on QERR_DEVICE_ENCRYPTED o [PATCH 15/35] migration: don't rely on any QERR_SOCKET_* o [PATCH 29/35] qmp: switch to the new error format on the wire o [PATCH 35/35] docs: writing-qmp-commands.txt: update error section 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 | 69 ++ hmp.h | 1 + migration-tcp.c | 22 +- monitor.c | 83 ++- nbd.c | 2 +- qapi-schema.json | 94 +++- 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, 268 insertions(+), 973 deletions(-)