aboutsummaryrefslogtreecommitdiff
path: root/sysemu.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-21 18:59:04 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-21 18:59:04 +0000
commit428c570512c1d9298b52dc9fc1a541b542a5c117 (patch)
tree2c250b7c913648e5d1cb7cfbece271cbb2c9ea89 /sysemu.h
parent7da03b1d2622a66b033544e16d82d16d8a49568c (diff)
Stop VM on ENOSPC error. (Gleb Natapov)
This version of the patch adds new option "werror" to -drive flag. Possible values are: report - report errors to a guest as IO errors ignore - continue as if nothing happened stop - stop VM on any error and retry last command on resume enospc - stop vm on ENOSPC error and retry last command on resume all other errors are reported to a guest. Default is "report" to maintain current behaviour. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6388 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'sysemu.h')
-rw-r--r--sysemu.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysemu.h b/sysemu.h
index 56eb9b32c8..b390184df0 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -128,11 +128,17 @@ typedef enum {
IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO
} BlockInterfaceType;
+typedef enum {
+ BLOCK_ERR_REPORT, BLOCK_ERR_IGNORE, BLOCK_ERR_STOP_ENOSPC,
+ BLOCK_ERR_STOP_ANY
+} BlockInterfaceErrorAction;
+
typedef struct DriveInfo {
BlockDriverState *bdrv;
BlockInterfaceType type;
int bus;
int unit;
+ BlockInterfaceErrorAction onerror;
char serial[21];
} DriveInfo;
@@ -146,6 +152,7 @@ extern DriveInfo drives_table[MAX_DRIVES+1];
extern int drive_get_index(BlockInterfaceType type, int bus, int unit);
extern int drive_get_max_bus(BlockInterfaceType type);
extern const char *drive_get_serial(BlockDriverState *bdrv);
+extern BlockInterfaceErrorAction drive_get_onerror(BlockDriverState *bdrv);
/* serial ports */