qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [COMMIT 324a802] Revert "Open chr device for all serial p


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 324a802] Revert "Open chr device for all serial ports"
Date: Mon, 14 Sep 2009 21:54:33 -0000

From: Aurelien Jarno <address@hidden>

This reverts commit 55338f1dd4648d78ee130d83a92f1059ff1f3887.

diff --git a/vl.c b/vl.c
index e877a3c..0e61333 100644
--- a/vl.c
+++ b/vl.c
@@ -5688,17 +5688,15 @@ int main(int argc, char **argv, char **envp)
 
     for(i = 0; i < MAX_SERIAL_PORTS; i++) {
         const char *devname = serial_devices[i];
-        char label[32];
-        snprintf(label, sizeof(label), "serial%d", i);
         if (devname && strcmp(devname, "none")) {
+            char label[32];
+            snprintf(label, sizeof(label), "serial%d", i);
             serial_hds[i] = qemu_chr_open(label, devname, NULL);
-        } else {
-            serial_hds[i] = qemu_chr_open(label, "null", NULL);
-        }
-        if (!serial_hds[i]) {
-            fprintf(stderr, "qemu: could not open serial device '%s'\n",
-                    devname);
-            exit(1);
+            if (!serial_hds[i]) {
+                fprintf(stderr, "qemu: could not open serial device '%s'\n",
+                        devname);
+                exit(1);
+            }
         }
     }
 




reply via email to

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