aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-07-23 19:26:08 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-07-24 14:48:57 +0000
commitaad04cd024f0c59f0b96f032cde2e24eb3abba6d (patch)
tree5184e03ebe8152b856c6f6d055a1e2fc7b2d1e2b
parent1fc7bd4a86a2bfeafcec29445871eb97469a2699 (diff)
Fix chrdev return value conversion
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>
-rw-r--r--hw/baum.h2
-rw-r--r--qemu-char.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/hw/baum.h b/hw/baum.h
index 8af710fa21..3f28cc339a 100644
--- 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);
diff --git a/qemu-char.c b/qemu-char.c
index dcf706592b..2982bfd7bb 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -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);
}