qemu-devel
[Top][All Lists]
Advanced

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

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


From: Wenchao Xia
Subject: Re: [Qemu-devel] [PATCH V5 4/6] HMP: filter out space before check of sub-command
Date: Mon, 14 Jan 2013 10:11:12 +0800
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

于 2013-1-12 4:12, Luiz Capitulino 写道:
On Fri, 11 Jan 2013 17:14:03 +0800
Wenchao Xia <address@hidden> wrote:

   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++;
+        }

Is there a reason for this to be in a different patch? I mean, why don't
you squash this into the previous patch?

  Markus suggest to do it and I think this make things clear. I am OK
to merge it and drop p1.

Actually, I guess that you could skip the spaces after the
search_dispatch_table() call (using p) and drop p1. But please test it
before doing so :)

Otherwise series looks good to me.

          if (*p1 == '\0') {
              return cmd;
          }



--
Best Regards

Wenchao Xia




reply via email to

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