mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00: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:
committed by
Luiz Capitulino
parent
599a926abc
commit
d2674b2cf7
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user