From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7Hh2-0001D2-9y for qemu-devel@nongnu.org; Sat, 25 Jan 2014 23:51:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7Hgw-00030O-UW for qemu-devel@nongnu.org; Sat, 25 Jan 2014 23:51:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7Hgw-0002zQ-Mz for qemu-devel@nongnu.org; Sat, 25 Jan 2014 23:51:30 -0500 Date: Sun, 26 Jan 2014 12:51:22 +0800 From: Amos Kong Message-ID: <20140126045122.GA9718@amosk.info> References: <1390488396-16538-1-git-send-email-akong@redhat.com> <1390488396-16538-3-git-send-email-akong@redhat.com> <20140124091212.GB12401@T430.nay.redhat.com> <20140124093435.GA21527@amosk.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140124093435.GA21527@amosk.info> Subject: Re: [Qemu-devel] [PATCH v4 2/5] qapi: add qapi-introspect.py code generator List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: mdroth@linux.vnet.ibm.com, qiaonuohan@cn.fujitsu.com, qemu-devel@nongnu.org, xiawenc@linux.vnet.ibm.com, lcapitulino@redhat.com On Fri, Jan 24, 2014 at 05:34:35PM +0800, Amos Kong wrote: > On Fri, Jan 24, 2014 at 05:12:12PM +0800, Fam Zheng wrote: > > On Thu, 01/23 22:46, Amos Kong wrote: > > > index 0000000..03179fa > > > --- /dev/null > > > +++ b/scripts/qapi-introspect.py > > > @@ -0,0 +1,172 @@ > > > +# > > > +# QAPI introspection info generator > > > +# > > > +# Copyright (C) 2014 Red Hat, Inc. > > > +# > > > +# Authors: > > > +# Amos Kong > > > +# > > > +# This work is licensed under the terms of the GNU GPLv2. > > > +# See the COPYING.LIB file in the top-level directory. > > > + > > > +from ordereddict import OrderedDict > > > +from qapi import * > > > +import sys > > > +import os > > > +import getopt > > > +import errno > > > + > > > + > > > +try: > > > + opts, args = getopt.gnu_getopt(sys.argv[1:], "hp:o:", > > > + ["header", "prefix=", "output-dir="]) > > > +except getopt.GetoptError, err: > > > + print str(err) > > > + sys.exit(1) > > > + > > > +output_dir = "" > > > +prefix = "" > > > +h_file = 'qapi-introspect.h' > > > + > > > +do_h = False > > > + > > > +for o, a in opts: > > > + if o in ("-p", "--prefix"): > > > + prefix = a > > > > Is this option used in your series? > > Not, I will remove it. It's not used currently, but it will be used when we add schema query command for qemu-guest-agent in next step, I will add the -p option at that time. -- Amos.