Re: [Qemu-devel] [PATCH V5 1/7] monitor: avoid direct use of global *cur_mon in completion functions

2013-07-10 Thread Wenchao Xia
于 2013-7-9 22:14, Luiz Capitulino 写道: On Tue, 09 Jul 2013 22:03:42 +0800 Wenchao Xia xiaw...@linux.vnet.ibm.com wrote: You could pass cur_mon to readline_completion() in readline_handle_byte() to avoid all this, but it would be preferable to clarify the matter. This is also another benefit

Re: [Qemu-devel] [PATCH V5 1/7] monitor: avoid direct use of global *cur_mon in completion functions

2013-07-09 Thread Wenchao Xia
You could pass cur_mon to readline_completion() in readline_handle_byte() to avoid all this, but it would be preferable to clarify the matter. This is also another benefit of having readline_completion() in a different patch, you can (and should!) clarify this point in the commit log along

Re: [Qemu-devel] [PATCH V5 1/7] monitor: avoid direct use of global *cur_mon in completion functions

2013-07-09 Thread Luiz Capitulino
On Tue, 09 Jul 2013 22:03:42 +0800 Wenchao Xia xiaw...@linux.vnet.ibm.com wrote: You could pass cur_mon to readline_completion() in readline_handle_byte() to avoid all this, but it would be preferable to clarify the matter. This is also another benefit of having readline_completion() in

Re: [Qemu-devel] [PATCH V5 1/7] monitor: avoid direct use of global *cur_mon in completion functions

2013-07-08 Thread Luiz Capitulino
On Sat, 29 Jun 2013 11:52:55 +0800 Wenchao Xia xiaw...@linux.vnet.ibm.com wrote: Parameter *mon is added to replace *cur_mon, and readline_completion() pass rs-mon as value, which should be initialized in readline_init() called by monitor_init(). In short, structure ReadLineState controls

Re: [Qemu-devel] [PATCH V5 1/7] monitor: avoid direct use of global *cur_mon in completion functions

2013-07-08 Thread Wenchao Xia
于 2013-7-8 23:17, Luiz Capitulino 写道: On Sat, 29 Jun 2013 11:52:55 +0800 Wenchao Xia xiaw...@linux.vnet.ibm.com wrote: Parameter *mon is added to replace *cur_mon, and readline_completion() pass rs-mon as value, which should be initialized in readline_init() called by monitor_init(). In short,

[Qemu-devel] [PATCH V5 1/7] monitor: avoid direct use of global *cur_mon in completion functions

2013-06-28 Thread Wenchao Xia
Parameter *mon is added to replace *cur_mon, and readline_completion() pass rs-mon as value, which should be initialized in readline_init() called by monitor_init(). In short, structure ReadLineState controls where the action would be taken now. Signed-off-by: Wenchao Xia