From patchwork Fri May 16 15:30:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 349643 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2ECD8140082 for ; Sat, 17 May 2014 01:31:40 +1000 (EST) Received: from localhost ([::1]:36332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlK6k-0004Xr-5f for incoming@patchwork.ozlabs.org; Fri, 16 May 2014 11:31:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlK6B-0003Rn-Kr for qemu-devel@nongnu.org; Fri, 16 May 2014 11:31:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlK63-0006ES-Lb for qemu-devel@nongnu.org; Fri, 16 May 2014 11:31:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlK63-0006E7-Ep for qemu-devel@nongnu.org; Fri, 16 May 2014 11:30:55 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4GFUnoS020366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 May 2014 11:30:52 -0400 Received: from localhost (ovpn-113-132.phx2.redhat.com [10.3.113.132]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4GFUmlB006882; Fri, 16 May 2014 11:30:49 -0400 From: Luiz Capitulino To: peter.maydell@linaro.org Date: Fri, 16 May 2014 11:30:28 -0400 Message-Id: <1400254235-9435-14-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1400254235-9435-1-git-send-email-lcapitulino@redhat.com> References: <1400254235-9435-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org, anthony@codemonkey.ws Subject: [Qemu-devel] [PULL 13/20] qapi: Show qapi-commands.py invocation in qapi-code-gen.txt X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Markus Armbruster While there, pare down the shell prompts. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- docs/qapi-code-gen.txt | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt index 1948946..867d124 100644 --- a/docs/qapi-code-gen.txt +++ b/docs/qapi-code-gen.txt @@ -230,14 +230,13 @@ node structure that can be used to chain together a list of such types in case we want to accept/return a list of this type with a command), and a command which takes that type as a parameter and returns the same type: - mdroth@illuin:~/w/qemu2.git$ cat example-schema.json + $ cat example-schema.json { 'type': 'UserDefOne', 'data': { 'integer': 'int', 'string': 'str' } } { 'command': 'my-command', 'data': {'arg1': 'UserDefOne'}, 'returns': 'UserDefOne' } - mdroth@illuin:~/w/qemu2.git$ === scripts/qapi-types.py === @@ -255,9 +254,9 @@ created code. Example: - mdroth@illuin:~/w/qemu2.git$ python scripts/qapi-types.py \ - --output-dir="qapi-generated" --prefix="example-" --input-file=example-schema.json - mdroth@illuin:~/w/qemu2.git$ cat qapi-generated/example-qapi-types.c + $ python scripts/qapi-types.py --output-dir="qapi-generated" \ + --prefix="example-" --input-file=example-schema.json + $ cat qapi-generated/example-qapi-types.c [Uninteresting stuff omitted...] void qapi_free_UserDefOneList(UserDefOneList * obj) @@ -290,7 +289,7 @@ Example: qapi_dealloc_visitor_cleanup(md); } - mdroth@illuin:~/w/qemu2.git$ cat qapi-generated/example-qapi-types.h + $ cat qapi-generated/example-qapi-types.h [Uninteresting stuff omitted...] #ifndef EXAMPLE_QAPI_TYPES_H @@ -342,9 +341,9 @@ $(prefix)qapi-visit.h: declarations for previously mentioned visitor Example: - mdroth@illuin:~/w/qemu2.git$ python scripts/qapi-visit.py \ - --output-dir="qapi-generated" --prefix="example-" --input-file=example-schema.json - mdroth@illuin:~/w/qemu2.git$ cat qapi-generated/example-qapi-visit.c + $ python scripts/qapi-visit.py --output-dir="qapi-generated" + --prefix="example-" --input-file=example-schema.json + $ cat qapi-generated/example-qapi-visit.c [Uninteresting stuff omitted...] static void visit_type_UserDefOne_fields(Visitor *m, UserDefOne ** obj, Error **errp) @@ -400,7 +399,9 @@ Example: out: error_propagate(errp, err); } - mdroth@illuin:~/w/qemu2.git$ cat qapi-generated/example-qapi-visit.h + $ python scripts/qapi-commands.py --output-dir="qapi-generated" \ + --prefix="example-" --input-file=example-schema.json + $ cat qapi-generated/example-qapi-visit.h [Uninteresting stuff omitted...] #ifndef EXAMPLE_QAPI_VISIT_H @@ -412,7 +413,6 @@ Example: void visit_type_UserDefOneList(Visitor *m, UserDefOneList ** obj, const char *name, Error **errp); #endif - mdroth@illuin:~/w/qemu2.git$ === scripts/qapi-commands.py === @@ -433,7 +433,7 @@ $(prefix)qmp-commands.h: Function prototypes for the QMP commands Example: - mdroth@illuin:~/w/qemu2.git$ cat qapi-generated/example-qmp-marshal.c + $ cat qapi-generated/example-qmp-marshal.c [Uninteresting stuff omitted...] static void qmp_marshal_output_my_command(UserDefOne * ret_in, QObject **ret_out, Error **errp) @@ -497,7 +497,7 @@ Example: } qapi_init(qmp_init_marshal); - mdroth@illuin:~/w/qemu2.git$ cat qapi-generated/example-qmp-commands.h + $ cat qapi-generated/example-qmp-commands.h [Uninteresting stuff omitted...] #ifndef EXAMPLE_QMP_COMMANDS_H @@ -510,4 +510,3 @@ Example: UserDefOne * qmp_my_command(UserDefOne * arg1, Error **errp); #endif - mdroth@illuin:~/w/qemu2.git$