Received: from eggs.gnu.org ([208.118.235.92]:41881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Su4qG-0001Rh-Tj for qemu-devel@nongnu.org; Wed, 25 Jul 2012 12:53:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Su4qF-00017D-SX for qemu-devel@nongnu.org; Wed, 25 Jul 2012 12:53:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Su4qF-000172-Ko for qemu-devel@nongnu.org; Wed, 25 Jul 2012 12:53:43 -0400 From: Luiz Capitulino Date: Wed, 25 Jul 2012 13:54:05 -0300 Message-Id: <1343235256-26310-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH v2 00/11]: qapi: generate qerrors from qapi-schema-errors.json List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, aliguori@us.ibm.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com This series moves all qerrors we have today to qapi-schema-errors.json and generates the QERR_ macros and the qerror_table[] from it. With this series, one doesn't have to manually add an error macro and the matching table entry anymore. He or she just have to add the new error to qapi-schema-errors.json. There's only one small problem: the matching between error class name and the (generated) error macro may not be clear for those not familirized with qerrors. There are two possible solutions to this: 1. Add the generated macro name along with the error class name in qapi-schema-json-errors.json; and/or 2. add docs/qapi-errors.txt to explain this in detail This series is my first step on improving our error API. o v2 - Small qapi-errors.py improvements - Fix QERR_DEVICE_ENCRYPTED and QERR_AMBIGUOUS_PATH desc message Makefile | 8 +- hw/qdev-properties.c | 2 +- migration-tcp.c | 6 +- monitor.c | 2 +- qapi-schema-errors.json | 616 +++++++++++++++++++++++++++++++++++++++++++++++ qapi/qmp-dispatch.c | 2 +- qapi/qmp-input-visitor.c | 2 +- qemu-sockets.c | 22 +- qerror.c | 310 +----------------------- qerror.h | 220 +---------------- scripts/check-qerror.sh | 6 +- scripts/qapi-errors.py | 177 ++++++++++++++ scripts/qapi.py | 4 +- 13 files changed, 824 insertions(+), 553 deletions(-)