From patchwork Mon Feb 1 18:07:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/2] block: Introduce drive_get_err_action() Date: Mon, 01 Feb 2010 08:07:47 -0000 From: Luiz Capitulino X-Patchwork-Id: 44212 Message-Id: <1265047668-15039-2-git-send-email-lcapitulino@redhat.com> To: qemu-devel@nongnu.org Cc: kwolf@redhat.com 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);