qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH V10 00/15] monitor: support sub command group in auto completion and help
Date: Fri, 30 Aug 2013 10:22:43 +0800	[thread overview]
Message-ID: <522001F3.8080706@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130829101648.7c999282@redhat.com>

于 2013-8-29 22:16, Luiz Capitulino 写道:
> On Tue, 27 Aug 2013 20:38:12 +0800
> Wenchao Xia <xiawenc@linux.vnet.ibm.com> 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

  reply	other threads:[~2013-08-30  2:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 12:38 [Qemu-devel] [PATCH V10 00/15] monitor: support sub command group in auto completion and help Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 01/15] monitor: avoid use of global *cur_mon in cmd_completion() Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 02/15] monitor: avoid use of global *cur_mon in file_completion() Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 03/15] monitor: avoid use of global *cur_mon in block_completion_it() Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 04/15] monitor: avoid use of global *cur_mon in monitor_find_completion() Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 05/15] monitor: avoid use of global *cur_mon in readline_completion() Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 06/15] monitor: call sortcmdlist() only one time Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 07/15] monitor: split off monitor_data_init() Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 08/15] monitor: avoid direct use of global variable *mon_cmds Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 09/15] monitor: code move for parse_cmdline() Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 10/15] monitor: refine parse_cmdline() Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 11/15] monitor: support sub command in help Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 12/15] monitor: refine monitor_find_completion() Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 13/15] monitor: support sub command in auto completion Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 14/15] monitor: allow "help" show message for single command in sub group Wenchao Xia
2013-08-27 12:38 ` [Qemu-devel] [PATCH V10 15/15] monitor: improve auto complete of "help" " Wenchao Xia
2013-08-29 14:16 ` [Qemu-devel] [PATCH V10 00/15] monitor: support sub command group in auto completion and help Luiz Capitulino
2013-08-30  2:22   ` Wenchao Xia [this message]
2013-08-30 11:31     ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=522001F3.8080706@linux.vnet.ibm.com \
    --to=xiawenc@linux.vnet.ibm.com \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).