aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2009-09-14 23:49:43 +0200
committerAurelien Jarno <aurelien@aurel32.net>2009-09-14 23:52:20 +0200
commit324a80218503b9cadce25ffb24f247a80aff2def (patch)
tree3f3c4f1b8a9e8d7e95ec01f2ed5d3097b85593c2
parent5c637a20e9d13433feb05b804b946690287ffe72 (diff)
Revert "Open chr device for all serial ports"
This reverts commit 55338f1dd4648d78ee130d83a92f1059ff1f3887.
-rw-r--r--vl.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/vl.c b/vl.c
index e877a3cdbd..0e6133316a 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);
+ }
}
}