mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
iostatus: rename BlockErrorAction, BlockQMPEventAction
We want to remove knowledge of BLOCK_ERR_STOP_ENOSPC from drivers; drivers should only be told whether to stop/report/ignore the error. On the other hand, we want to keep using the nicer BlockErrorAction name in the drivers. So rename the enums, while leaving aside the names of the enum values for now. 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
0c81734765
commit
ff06f5f351
6 changed files with 14 additions and 14 deletions
8
block.c
8
block.c
|
@ -1387,7 +1387,7 @@ void bdrv_set_dev_ops(BlockDriverState *bs, const BlockDevOps *ops,
|
|||
}
|
||||
|
||||
void bdrv_emit_qmp_error_event(const BlockDriverState *bdrv,
|
||||
BlockQMPEventAction action, int is_read)
|
||||
BlockErrorAction action, int is_read)
|
||||
{
|
||||
QObject *data;
|
||||
const char *action_str;
|
||||
|
@ -2474,14 +2474,14 @@ void bdrv_set_io_limits(BlockDriverState *bs,
|
|||
bs->io_limits_enabled = bdrv_io_limits_enabled(bs);
|
||||
}
|
||||
|
||||
void bdrv_set_on_error(BlockDriverState *bs, BlockErrorAction on_read_error,
|
||||
BlockErrorAction on_write_error)
|
||||
void bdrv_set_on_error(BlockDriverState *bs, BlockdevOnError on_read_error,
|
||||
BlockdevOnError on_write_error)
|
||||
{
|
||||
bs->on_read_error = on_read_error;
|
||||
bs->on_write_error = on_write_error;
|
||||
}
|
||||
|
||||
BlockErrorAction bdrv_get_on_error(BlockDriverState *bs, int is_read)
|
||||
BlockdevOnError bdrv_get_on_error(BlockDriverState *bs, int is_read)
|
||||
{
|
||||
return is_read ? bs->on_read_error : bs->on_write_error;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue