From: Jan Kiszka Date: Tue, 15 Jun 2010 22:38:34 +0000 (+0200) Subject: monitor: Fix command completion vs. boolean switches X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3b6dbf277232920a6463fc01d630e4d9dc378ef6;p=qemu.git monitor: Fix command completion vs. boolean switches We now have to move forward to the next argument type via next_arg_type. This patch fixes completion for 'eject' and maybe also other commands. Signed-off-by: Jan Kiszka Signed-off-by: Luiz Capitulino --- diff --git a/monitor.c b/monitor.c index 42ae1546db..b375f102b7 100644 --- a/monitor.c +++ b/monitor.c @@ -3918,7 +3918,7 @@ static void monitor_find_completion(const char *cmdline) } str = args[nb_args - 1]; if (*ptype == '-' && ptype[1] != '\0') { - ptype += 2; + ptype = next_arg_type(ptype); } switch(*ptype) { case 'F':