qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 16/19] spice-qemu-char: Chardev open error reporting


From: Markus Armbruster
Subject: [Qemu-devel] [PATCH 16/19] spice-qemu-char: Chardev open error reporting, spicevmc part
Date: Tue, 7 Feb 2012 15:09:23 +0100

Convert to error_report().

Signed-off-by: Markus Armbruster <address@hidden>
---
 spice-qemu-char.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/spice-qemu-char.c b/spice-qemu-char.c
index 1e735ff..290437d 100644
--- a/spice-qemu-char.c
+++ b/spice-qemu-char.c
@@ -176,16 +176,16 @@ static void print_allowed_subtypes(void)
     const char** psubtype;
     int i;
 
-    fprintf(stderr, "allowed names: ");
+    error_printf("allowed names: ");
     for(i=0, psubtype = spice_server_char_device_recognized_subtypes();
         *psubtype != NULL; ++psubtype, ++i) {
         if (i == 0) {
-            fprintf(stderr, "%s", *psubtype);
+            error_printf("%s", *psubtype);
         } else {
-            fprintf(stderr, ", %s", *psubtype);
+            error_printf(", %s", *psubtype);
         }
     }
-    fprintf(stderr, "\n");
+    error_printf("\n");
 }
 
 CharDriverState *qemu_chr_open_spice(QemuOpts *opts)
@@ -198,7 +198,7 @@ CharDriverState *qemu_chr_open_spice(QemuOpts *opts)
     const char *subtype = NULL;
 
     if (name == NULL) {
-        fprintf(stderr, "spice-qemu-char: missing name parameter\n");
+        error_report("spicevmc character device requires parameter name");
         print_allowed_subtypes();
         return NULL;
     }
@@ -209,7 +209,7 @@ CharDriverState *qemu_chr_open_spice(QemuOpts *opts)
         }
     }
     if (subtype == NULL) {
-        fprintf(stderr, "spice-qemu-char: unsupported name\n");
+        error_report("name '%s' is not supported", name);
         print_allowed_subtypes();
         return NULL;
     }
-- 
1.7.6.5




reply via email to

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