qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH V9 06/15] monitor: call sortcmdlist() only one time


From: Wenchao Xia
Subject: [Qemu-devel] [PATCH V9 06/15] monitor: call sortcmdlist() only one time
Date: Fri, 23 Aug 2013 16:17:58 +0800

It doesn't need to be done for every monitor, so change it.

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

diff --git a/monitor.c b/monitor.c
index 63a779f..bf019e2 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4762,6 +4762,7 @@ void monitor_init(CharDriverState *chr, int flags)
 
     if (is_first_init) {
         monitor_protocol_event_init();
+        sortcmdlist();
         is_first_init = 0;
     }
 
@@ -4791,8 +4792,6 @@ void monitor_init(CharDriverState *chr, int flags)
     QLIST_INSERT_HEAD(&mon_list, mon, entry);
     if (!default_mon || (flags & MONITOR_IS_DEFAULT))
         default_mon = mon;
-
-    sortcmdlist();
 }
 
 static void bdrv_password_cb(Monitor *mon, const char *password, void *opaque)
-- 
1.7.1





reply via email to

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