qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 6/9] monitor: Cleanup ID assignment for compat switc


From: Luiz Capitulino
Subject: [Qemu-devel] [PATCH 6/9] monitor: Cleanup ID assignment for compat switch
Date: Mon, 26 Apr 2010 12:47:30 -0300

From: Jan Kiszka <address@hidden>

Canonicalize the ID assignment when creating monitor devices via the
legacy switch and use less easily colliding names.

Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
 vl.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/vl.c b/vl.c
index 9ef6f2c..20d24be 100644
--- a/vl.c
+++ b/vl.c
@@ -2348,11 +2348,9 @@ static void monitor_parse(const char *optarg, const char 
*mode)
     if (strstart(optarg, "chardev:", &p)) {
         snprintf(label, sizeof(label), "%s", p);
     } else {
-        if (monitor_device_index) {
-            snprintf(label, sizeof(label), "monitor%d",
-                     monitor_device_index);
-        } else {
-            snprintf(label, sizeof(label), "monitor");
+        snprintf(label, sizeof(label), "compat_monitor%d",
+                 monitor_device_index);
+        if (monitor_device_index == 0) {
             def = 1;
         }
         opts = qemu_chr_parse_compat(label, optarg);
-- 
1.7.1.rc1.12.ga6018





reply via email to

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