qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 15/19] console: Chardev open error reporting, consol


From: Markus Armbruster
Subject: [Qemu-devel] [PATCH 15/19] console: Chardev open error reporting, console part
Date: Tue, 7 Feb 2012 15:09:22 +0100

Unlike many other backends, this one leaves open error reporting to
its caller.  Because the caller doesn't know what went wrong, this
results in a pretty useless error message.

Change it to report its errors.  Improves the message you get when
attempting to create too many consoles from

    chardev: opening backend "vc" failed

to

    qemu-system-x86_64: -chardev vc,id=c13: Can't create more than 12 consoles
    chardev: opening backend "vc" failed

The useless "opening backend failed" message will be cleaned up
shortly.

Signed-off-by: Markus Armbruster <address@hidden>
---
 console.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/console.c b/console.c
index 744ef2d..f6b93bd 100644
--- a/console.c
+++ b/console.c
@@ -1529,8 +1529,8 @@ CharDriverState *text_console_init(QemuOpts *opts)
     } else {
         s = new_console(NULL, TEXT_CONSOLE_FIXED_SIZE);
     }
-
     if (!s) {
+        error_report("Can't create more than %d consoles", MAX_CONSOLES);
         g_free(chr);
         return NULL;
     }
-- 
1.7.6.5




reply via email to

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