From patchwork Sat Jul 23 21:24:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 106495 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 2E7F2B6F77 for ; Sun, 24 Jul 2011 07:25:28 +1000 (EST) Received: from localhost ([::1]:59349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkjhN-0007OE-FQ for incoming@patchwork.ozlabs.org; Sat, 23 Jul 2011 17:25:25 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkjhF-0007BC-4y for qemu-devel@nongnu.org; Sat, 23 Jul 2011 17:25:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkjhE-0001MM-0z for qemu-devel@nongnu.org; Sat, 23 Jul 2011 17:25:17 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:44046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkjhD-0001MH-T8 for qemu-devel@nongnu.org; Sat, 23 Jul 2011 17:25:15 -0400 Received: by qyk10 with SMTP id 10so372110qyk.4 for ; Sat, 23 Jul 2011 14:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=/LYh3cnA7sZUKkIY5WQE6GLitmXGnkMEsYMAMoFB0UE=; b=hVYfw6bqoNUJdK2yNZzGhYxADPw7Brih7jwhqCWOA3paP+vdmO9+CGZJ3SDFQpoy4S FB8Cw64uJMPp92Rpn9PaTdUm+FWp8AergLYiC3Y0Ai8KjR8bZ9W57VxFWlVSoqoUjCNB 04T4fgOVoGEytgJWhQSRmKy1BZRcNiV1gUTII= Received: by 10.224.201.3 with SMTP id ey3mr2414362qab.266.1311456315177; Sat, 23 Jul 2011 14:25:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.29.6 with HTTP; Sat, 23 Jul 2011 14:24:55 -0700 (PDT) From: Blue Swirl Date: Sun, 24 Jul 2011 00:24:55 +0300 Message-ID: To: qemu-devel , Kevin Wolf X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.173 Subject: [Qemu-devel] [PATCH 1/3] Fix chrdev return value conversion 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 6e1db57b2ac9025c2443c665a0d9e78748637b26 didn't convert brlapi or win32 chrdevs, breaking build for those. Fix by converting the chrdevs. Signed-off-by: Blue Swirl Acked-by: Kevin Wolf --- hw/baum.h | 2 +- qemu-char.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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); } From 8bcd08d1fe7c90869ea6659b6248ace6cf7b1f32 Mon Sep 17 00:00:00 2001 Message-Id: <8bcd08d1fe7c90869ea6659b6248ace6cf7b1f32.1311456245.git.blauwirbel@gmail.com> From: Blue Swirl Date: Sat, 23 Jul 2011 19:26:08 +0000 Subject: [PATCH 1/3] Fix chrdev return value conversion 6e1db57b2ac9025c2443c665a0d9e78748637b26 didn't convert brlapi or win32 chrdevs, breaking build for those. Fix by converting the chrdevs. Signed-off-by: Blue Swirl --- hw/baum.h | 2 +- qemu-char.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/baum.h b/hw/baum.h index 8af710f..3f28cc3 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 dcf7065..2982bfd 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); } -- 1.7.2.5