From patchwork Mon Feb 1 18:07:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 44212 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 591A5B7D5D for ; Tue, 2 Feb 2010 05:10:26 +1100 (EST) Received: from localhost ([127.0.0.1]:43299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nc0j9-00075d-CR for incoming@patchwork.ozlabs.org; Mon, 01 Feb 2010 13:10:23 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nc0h4-0006f3-Ri for qemu-devel@nongnu.org; Mon, 01 Feb 2010 13:08:14 -0500 Received: from [199.232.76.173] (port=57567 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nc0h3-0006er-Gb for qemu-devel@nongnu.org; Mon, 01 Feb 2010 13:08:13 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nc0h2-0006o7-A6 for qemu-devel@nongnu.org; Mon, 01 Feb 2010 13:08:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47972) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nc0h1-0006np-UB for qemu-devel@nongnu.org; Mon, 01 Feb 2010 13:08:12 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o11I8AGR008355 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Feb 2010 13:08:11 -0500 Received: from localhost (vpn-9-68.rdu.redhat.com [10.11.9.68]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o11I88Lm019485; Mon, 1 Feb 2010 13:08:09 -0500 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Mon, 1 Feb 2010 16:07:47 -0200 Message-Id: <1265047668-15039-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1265047668-15039-1-git-send-email-lcapitulino@redhat.com> References: <1265047668-15039-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com Subject: [Qemu-devel] [PATCH 1/2] block: Introduce drive_get_err_action() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org It's really drive_get_on_error()'s current body. This is needed so that the disk error event code can also use the returned action. Signed-off-by: Luiz Capitulino --- vl.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 6f1e1ab..57c439d 100644 --- a/vl.c +++ b/vl.c @@ -1843,7 +1843,7 @@ const char *drive_get_serial(BlockDriverState *bdrv) return "\0"; } -BlockInterfaceErrorAction drive_get_on_error( +static BlockInterfaceErrorAction drive_get_err_action( BlockDriverState *bdrv, int is_read) { DriveInfo *dinfo; @@ -1856,6 +1856,12 @@ BlockInterfaceErrorAction drive_get_on_error( return is_read ? BLOCK_ERR_REPORT : BLOCK_ERR_STOP_ENOSPC; } +BlockInterfaceErrorAction drive_get_on_error( + BlockDriverState *bdrv, int is_read) +{ + return drive_get_err_action(bdrv, is_read); +} + static void bdrv_format_print(void *opaque, const char *name) { fprintf(stderr, " %s", name);