diff options
author | Kevin Wolf <kwolf@redhat.com> | 2009-11-27 13:25:36 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 11:45:49 -0600 |
commit | f785009961c335a4c9c735b2bf96d5a0d2e5bde1 (patch) | |
tree | 368060a24693b2e1f25ace603ea317ec93ccbd8a /vl.c | |
parent | 843079386eed4ae2dbe1be98383f185b7721411b (diff) |
Rename DriveInfo.onerror to on_write_error
Either rename variables and functions to refer to write errors (which is what
they actually do) or introduce a parameter to distinguish reads and writes.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1959,13 +1959,18 @@ const char *drive_get_serial(BlockDriverState *bdrv) return "\0"; } -BlockInterfaceErrorAction drive_get_onerror(BlockDriverState *bdrv) +BlockInterfaceErrorAction drive_get_on_error( + BlockDriverState *bdrv, int is_read) { DriveInfo *dinfo; + if (is_read) { + return BLOCK_ERR_REPORT; + } + QTAILQ_FOREACH(dinfo, &drives, next) { if (dinfo->bdrv == bdrv) - return dinfo->onerror; + return dinfo->on_write_error; } return BLOCK_ERR_STOP_ENOSPC; @@ -2263,7 +2268,7 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque, dinfo->type = type; dinfo->bus = bus_id; dinfo->unit = unit_id; - dinfo->onerror = onerror; + dinfo->on_write_error = onerror; dinfo->opts = opts; if (serial) strncpy(dinfo->serial, serial, sizeof(serial)); |