From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRtBa-0006OR-1y for qemu-devel@nongnu.org; Sun, 23 Mar 2014 20:56:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRtBV-00035p-DZ for qemu-devel@nongnu.org; Sun, 23 Mar 2014 20:56:18 -0400 Received: from mail-ie0-x22d.google.com ([2607:f8b0:4001:c03::22d]:53947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRtBV-00035R-8z for qemu-devel@nongnu.org; Sun, 23 Mar 2014 20:56:13 -0400 Received: by mail-ie0-f173.google.com with SMTP id rl12so4791490iec.18 for ; Sun, 23 Mar 2014 17:56:12 -0700 (PDT) Message-ID: <532F829E.8040903@gmail.com> Date: Mon, 24 Mar 2014 08:55:58 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1388704234-22498-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1388704234-22498-4-git-send-email-xiawenc@linux.vnet.ibm.com> <5318C354.6060706@redhat.com> <5329030F.5010401@gmail.com> <532B6BDE.9040705@redhat.com> In-Reply-To: <532B6BDE.9040705@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: armbru@redhat.com, lcapitulino@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com 于 2014/3/21 6:29, Eric Blake 写道: > On 03/18/2014 08:38 PM, Wenchao Xia wrote: >> 于 2014/3/7 2:49, Eric Blake 写道: >>> On 01/02/2014 04:10 PM, Wenchao Xia wrote: >>>> qapi-event.py will parse the schema and generate qapi-event.c, then >>>> the API in qapi-event.c can be used to handle event in qemu code. >>>> All API have prefix "qapi_event", all types have prefix "QAPIEvent". >>>> Examples can be found in following patches. >>>> >>>> +for o, a in opts: >>>> + if o in ("-p", "--prefix"): >>>> + prefix = a >>>> + elif o in ("-o", "--output-dir"): >>>> + output_dir = a + "/" >>>> + elif o in ("-c", "--source"): >>>> + do_c = True >>>> + elif o in ("-h", "--header"): >>>> + do_h = True >>>> + elif o in ("-b", "--builtins"): >>>> + do_builtins = True >>> You may need to rebase this on top of other patches that refactor the >>> qapi generators to track the input file, for improved error messages. >> It seems qapi-visit.py and qapi-types.py remains the same as above in >> upstream, which kind of change are your referring to? > Lluís' patch to use an explicit input file via a new -i option: > https://lists.gnu.org/archive/html/qemu-devel/2014-02/msg05220.html > I see, will adjust it.