From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFENB-0004xh-L2 for qemu-devel@nongnu.org; Thu, 29 Aug 2013 22:23:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFEN2-0000Wp-IT for qemu-devel@nongnu.org; Thu, 29 Aug 2013 22:23:41 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:51339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFEN1-0000WI-W9 for qemu-devel@nongnu.org; Thu, 29 Aug 2013 22:23:32 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 30 Aug 2013 12:05:47 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 77AF42BB0052 for ; Fri, 30 Aug 2013 12:23:03 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7U2MpHY62259444 for ; Fri, 30 Aug 2013 12:22:52 +1000 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7U2N2S7025667 for ; Fri, 30 Aug 2013 12:23:02 +1000 Message-ID: <522001F3.8080706@linux.vnet.ibm.com> Date: Fri, 30 Aug 2013 10:22:43 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1377607107-11612-1-git-send-email-xiawenc@linux.vnet.ibm.com> <20130829101648.7c999282@redhat.com> In-Reply-To: <20130829101648.7c999282@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V10 00/15] monitor: support sub command group in auto completion and help List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org, armbru@redhat.com 于 2013-8-29 22:16, Luiz Capitulino 写道: > On Tue, 27 Aug 2013 20:38:12 +0800 > Wenchao Xia wrote: > >> This series make auto completion and help functions works normal for sub >> command, by using reentrant functions. In order to do that, global variables >> are not directly used in those functions any more. With this series, cmd_table >> is a member of structure Monitor so it is possible to create a monitor with >> different command table now, auto completion will work in that monitor. In >> short, "info" is not treated as a special case now, this series ensure help >> and auto complete function works normal for any sub command added in the future. >> >> Patch 5 replaced cur_mon with rs->mon, it is safe because: >> monitor_init() calls readline_init() which initialize mon->rs, result is >> mon->rs->mon == mon. Then qemu_chr_add_handlers() is called, which make >> monitor_read() function take *mon as its opaque. Later, when user input, >> monitor_read() is called, where cur_mon is set to *mon by "cur_mon = opaque". >> If qemu's monitors run in one thread, then later in readline_handle_byte() >> and readline_comletion(), cur_mon is actually equal to rs->mon, in another >> word, it points to the monitor instance, so it is safe to replace *cur_mon >> in those functions. >> >> Thanks for Luiz and Eric for reviewing. > > Applied to the qmp branch, thanks. > > Btw, I'm assuming that the patches that contain Eric's reviewed-by didn't > change since he reviewed them. Personally, I don't think it's right to carry > reviewed-bys when the patch changes, even if it's something small or > obvious. > I remember that the "Reviewed-by" were removed on all changed patches, except: Patches of V7 have typo issues which were pointed out by Eric with "Reviewed-by", for those I fixed the typo and kept the "Reviewed by". Some patches were not modified but the line number may change, since previous patch may have inserted new lines. For those I didn't remove "Reviewed-by". If the above is not appropriate, I'll avoid it. -- Best Regards Wenchao Xia