qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH V5 4/6] HMP: filter out space before check of sub-co


From: Wenchao Xia
Subject: [Qemu-devel] [PATCH V5 4/6] HMP: filter out space before check of sub-command
Date: Fri, 11 Jan 2013 17:14:03 +0800

  This fix the case when user input "@command ". Original
it will return NULL for monitor_parse_command(), now
it will return the @command related instance.

Signed-off-by: Wenchao Xia <address@hidden>
---
 monitor.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/monitor.c b/monitor.c
index 5435dc3..7b752a2 100644
--- a/monitor.c
+++ b/monitor.c
@@ -3588,6 +3588,9 @@ static const mon_cmd_t *monitor_parse_command(Monitor 
*mon,
     if (cmd->sub_table != NULL) {
         p1 = p;
         /* check if user set additional command */
+        while (qemu_isspace(*p1)) {
+            p1++;
+        }
         if (*p1 == '\0') {
             return cmd;
         }
-- 
1.7.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]