From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlGIN-0007tX-Cu for qemu-devel@nongnu.org; Mon, 25 Jul 2011 04:13:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlGIM-0004eH-1V for qemu-devel@nongnu.org; Mon, 25 Jul 2011 04:13:47 -0400 From: TeLeMan Date: Mon, 25 Jul 2011 16:16:31 +0800 Message-Id: <1311581791-923-1-git-send-email-geleman@gmail.com> Subject: [Qemu-devel] [PATCH] qemu-char: fix the commit "qemu-char: Print strerror message on failure" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-trivial@nongnu.org, TeLeMan , qemu-devel The commit 6e1db57b2ac9025c2443c665a0d9e78748637b26 missed patching qemu_chr_open_win_file(). Signed-off-by: TeLeMan --- qemu-char.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index dcf7065..ea7abfe 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 **_chr) { CharDriverState *chr; WinCharState *s; @@ -1793,12 +1793,14 @@ 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; + + *_chr = chr; + return 0; } static int qemu_chr_open_win_con(QemuOpts *opts, CharDriverState **_chr) { - return qemu_chr_open_win_file(GetStdHandle(STD_OUTPUT_HANDLE), chr); + return qemu_chr_open_win_file(GetStdHandle(STD_OUTPUT_HANDLE), _chr); } static int qemu_chr_open_win_file_out(QemuOpts *opts, CharDriverState **_chr) -- 1.7.3.1.msysgit.0