]> git.proxmox.com Git - qemu.git/commitdiff
Fix chrdev return value conversion
authorBlue Swirl <blauwirbel@gmail.com>
Sat, 23 Jul 2011 19:26:08 +0000 (19:26 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 24 Jul 2011 14:48:57 +0000 (14:48 +0000)
6e1db57b2ac9025c2443c665a0d9e78748637b26 didn't
convert brlapi or win32 chrdevs, breaking build for those.

Fix by converting the chrdevs.

Acked-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/baum.h
qemu-char.c

index 8af710fa21069accb1fef8e62dd2a4fb390314b5..3f28cc339a249d34f81d8672c68b7b4e2db82e0b 100644 (file)
--- a/hw/baum.h
+++ b/hw/baum.h
@@ -23,4 +23,4 @@
  */
 
 /* char device */
-CharDriverState *chr_baum_init(QemuOpts *opts);
+int chr_baum_init(QemuOpts *opts, CharDriverState **_chr);
index dcf706592b3db8da21b1ba66d3bfb271fb5d0466..2982bfd7bb0d7c47607e368de930bf970e373184 100644 (file)
@@ -1782,7 +1782,7 @@ static int qemu_chr_open_win_pipe(QemuOpts *opts, CharDriverState **_chr)
     return 0;
 }
 
-static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
+static int qemu_chr_open_win_file(HANDLE fd_out, CharDriverState **pchr)
 {
     CharDriverState *chr;
     WinCharState *s;
@@ -1793,10 +1793,11 @@ static CharDriverState *qemu_chr_open_win_file(HANDLE fd_out)
     chr->opaque = s;
     chr->chr_write = win_chr_write;
     qemu_chr_generic_open(chr);
-    return chr;
+    *pchr = chr;
+    return 0;
 }
 
-static int qemu_chr_open_win_con(QemuOpts *opts, CharDriverState **_chr)
+static int qemu_chr_open_win_con(QemuOpts *opts, CharDriverState **chr)
 {
     return qemu_chr_open_win_file(GetStdHandle(STD_OUTPUT_HANDLE), chr);
 }