From patchwork Mon Jul 25 08:16:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: TeLeMan X-Patchwork-Id: 106617 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 37229B6F80 for ; Mon, 25 Jul 2011 18:14:01 +1000 (EST) Received: from localhost ([::1]:55408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlGIS-0007tc-1h for incoming@patchwork.ozlabs.org; Mon, 25 Jul 2011 04:13:52 -0400 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 Received: from mail-pz0-f43.google.com ([209.85.210.43]:33213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlGIL-0004eD-Lo; Mon, 25 Jul 2011 04:13:46 -0400 Received: by pzk1 with SMTP id 1so8371342pzk.30 for ; Mon, 25 Jul 2011 01:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=A8kBs2EqP3X6v/5X5ZZ1FBQV2wAlZDe3snePg4xLlyA=; b=TIpXYeHy/gW5pF7CUKkqK7RXmV+2tK2LTlfJOxnNPAogMOCOeXYPV0zCJLTjFB4aTV Vbkecty/ec0hQnU4nWksJcFtr05qj/AcLfkThf1yULPHQrBKUDeuDEf4JBJHeIN3VDcz iEmBi2aBvtVw4gry+8K1eAQv0k72Jt5bkJUdc= Received: by 10.68.56.135 with SMTP id a7mr42058pbq.228.1311581624172; Mon, 25 Jul 2011 01:13:44 -0700 (PDT) Received: from localhost.localdomain ([211.101.48.70]) by mx.google.com with ESMTPS id g4sm4353668pbj.9.2011.07.25.01.13.38 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jul 2011 01:13:43 -0700 (PDT) From: TeLeMan To: Kevin Wolf Date: Mon, 25 Jul 2011 16:16:31 +0800 Message-Id: <1311581791-923-1-git-send-email-geleman@gmail.com> X-Mailer: git-send-email 1.7.2.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.43 Cc: qemu-trivial@nongnu.org, TeLeMan , qemu-devel Subject: [Qemu-devel] [PATCH] qemu-char: fix the commit "qemu-char: Print strerror message on failure" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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)