monitor: avoid use of global *cur_mon in readline_completion()
commitd1a9756ab8c2c2578cbcb325efffe0b0af916944
authorWenchao Xia <xiawenc@linux.vnet.ibm.com>
Tue, 27 Aug 2013 12:38:17 +0000 (27 20:38 +0800)
committerLuiz Capitulino <lcapitulino@redhat.com>
Fri, 30 Aug 2013 11:41:14 +0000 (30 07:41 -0400)
tree81944798d762a0cc0b91d50b90570ca888fcf4d4
parentd2674b2cf7db7dce865f3c2b89f0e36d1657a3b5
monitor: avoid use of global *cur_mon in readline_completion()

Now all completion functions do not use *cur_mon any more, instead
they use rs->mon. In short, structure ReadLineState decide where
the complete action would be taken now.

Tested with the case that qemu have two telnet monitors, auto
completion function works normal.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
readline.c