mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 19:14:58 -06:00
iostatus: move BlockdevOnError declaration to QAPI
This will let block-stream reuse the enum. Places that used the enums are renamed accordingly. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
ff06f5f351
commit
92aa5c6d77
11 changed files with 54 additions and 36 deletions
|
@ -559,13 +559,13 @@ static int ide_handle_rw_error(IDEState *s, int error, int op)
|
|||
int is_read = (op & BM_STATUS_RETRY_READ);
|
||||
BlockdevOnError action = bdrv_get_on_error(s->bs, is_read);
|
||||
|
||||
if (action == BLOCK_ERR_IGNORE) {
|
||||
if (action == BLOCKDEV_ON_ERROR_IGNORE) {
|
||||
bdrv_emit_qmp_error_event(s->bs, BDRV_ACTION_IGNORE, is_read);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((error == ENOSPC && action == BLOCK_ERR_STOP_ENOSPC)
|
||||
|| action == BLOCK_ERR_STOP_ANY) {
|
||||
if ((error == ENOSPC && action == BLOCKDEV_ON_ERROR_ENOSPC)
|
||||
|| action == BLOCKDEV_ON_ERROR_STOP) {
|
||||
s->bus->dma->ops->set_unit(s->bus->dma, s->unit);
|
||||
s->bus->error_status = op;
|
||||
bdrv_emit_qmp_error_event(s->bs, BDRV_ACTION_STOP, is_read);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue