diff mbox

[1/2] block: Introduce drive_get_err_action()

Message ID 1265047668-15039-2-git-send-email-lcapitulino@redhat.com
State New
Headers show

Commit Message

Luiz Capitulino Feb. 1, 2010, 6:07 p.m. UTC
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 <lcapitulino@redhat.com>
---
 vl.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
diff mbox

Patch

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);