mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
monitor: avoid use of global *cur_mon in monitor_find_completion()
Parameter *mon is added, and local variable *mon added in previous patch is removed. The caller readline_completion(), pass rs->mon as value, which should be initialized in readline_init() called by monitor_init(). 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>
This commit is contained in:
parent
599a926abc
commit
d2674b2cf7
3 changed files with 12 additions and 11 deletions
|
@ -8,7 +8,8 @@
|
|||
#define READLINE_MAX_COMPLETIONS 256
|
||||
|
||||
typedef void ReadLineFunc(Monitor *mon, const char *str, void *opaque);
|
||||
typedef void ReadLineCompletionFunc(const char *cmdline);
|
||||
typedef void ReadLineCompletionFunc(Monitor *mon,
|
||||
const char *cmdline);
|
||||
|
||||
typedef struct ReadLineState {
|
||||
char cmd_buf[READLINE_CMD_BUF_SIZE + 1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue