Fix chrdev return value conversion

6e1db57b2a 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>
This commit is contained in:
Blue Swirl 2011-07-23 19:26:08 +00:00
parent 1fc7bd4a86
commit aad04cd024
2 changed files with 5 additions and 4 deletions

View File

@ -23,4 +23,4 @@
*/
/* char device */
CharDriverState *chr_baum_init(QemuOpts *opts);
int chr_baum_init(QemuOpts *opts, CharDriverState **_chr);

View 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);
}