diff options
author | Anthony Liguori | 2013-08-30 19:26:04 +0200 |
---|---|---|
committer | Anthony Liguori | 2013-08-30 19:26:04 +0200 |
commit | 4ff78e0dbcd5c795962567fdc1b31e9e03c55b07 (patch) | |
tree | c1fbee238de5abd53a619bdda62ed90aa7a27f51 /readline.c | |
parent | Merge remote-tracking branch 'borntraeger/tags/kdump' into staging (diff) | |
parent | monitor: improve auto complete of "help" for single command in sub group (diff) | |
download | qemu-4ff78e0dbcd5c795962567fdc1b31e9e03c55b07.tar.gz qemu-4ff78e0dbcd5c795962567fdc1b31e9e03c55b07.tar.xz qemu-4ff78e0dbcd5c795962567fdc1b31e9e03c55b07.zip |
Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Wenchao Xia (15) and Stefan Weil (1)
# Via Luiz Capitulino
* luiz/queue/qmp:
monitor: improve auto complete of "help" for single command in sub group
monitor: allow "help" show message for single command in sub group
monitor: support sub command in auto completion
monitor: refine monitor_find_completion()
monitor: support sub command in help
monitor: refine parse_cmdline()
monitor: code move for parse_cmdline()
monitor: avoid direct use of global variable *mon_cmds
monitor: split off monitor_data_init()
monitor: call sortcmdlist() only one time
monitor: avoid use of global *cur_mon in readline_completion()
monitor: avoid use of global *cur_mon in monitor_find_completion()
monitor: avoid use of global *cur_mon in block_completion_it()
monitor: avoid use of global *cur_mon in file_completion()
monitor: avoid use of global *cur_mon in cmd_completion()
monitor: Add missing attributes to local function
Message-id: 1377865357-6742-1-git-send-email-lcapitulino@redhat.com
Diffstat (limited to 'readline.c')
-rw-r--r-- | readline.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/readline.c b/readline.c index 1c0f7ee26b..abf27ddec3 100644 --- a/readline.c +++ b/readline.c @@ -276,7 +276,6 @@ void readline_set_completion_index(ReadLineState *rs, int index) static void readline_completion(ReadLineState *rs) { - Monitor *mon = cur_mon; int len, i, j, max_width, nb_cols, max_prefix; char *cmdline; @@ -285,7 +284,7 @@ static void readline_completion(ReadLineState *rs) cmdline = g_malloc(rs->cmd_buf_index + 1); memcpy(cmdline, rs->cmd_buf, rs->cmd_buf_index); cmdline[rs->cmd_buf_index] = '\0'; - rs->completion_finder(cmdline); + rs->completion_finder(rs->mon, cmdline); g_free(cmdline); /* no completion found */ @@ -300,7 +299,7 @@ static void readline_completion(ReadLineState *rs) if (len > 0 && rs->completions[0][len - 1] != '/') readline_insert_char(rs, ' '); } else { - monitor_printf(mon, "\n"); + monitor_printf(rs->mon, "\n"); max_width = 0; max_prefix = 0; for(i = 0; i < rs->nb_completions; i++) { |