mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
block/qdev: Allow configuring rerror/werror with qdev properties
The rerror/werror policies are implemented in the devices, so that's where they should be configured. In comparison to the old options in -drive, the qdev properties are only added to those devices that actually support them. If the option isn't given (or "auto" is specified), the setting of the BlockBackend is used for compatibility with the old options. For block jobs, "auto" is the same as "enospc". Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
1e8fb7f1ee
commit
8c39825218
10 changed files with 45 additions and 1 deletions
|
@ -539,6 +539,19 @@ PropertyInfo qdev_prop_losttickpolicy = {
|
|||
.set = set_enum,
|
||||
};
|
||||
|
||||
/* --- Block device error handling policy --- */
|
||||
|
||||
QEMU_BUILD_BUG_ON(sizeof(BlockdevOnError) != sizeof(int));
|
||||
|
||||
PropertyInfo qdev_prop_blockdev_on_error = {
|
||||
.name = "BlockdevOnError",
|
||||
.description = "Error handling policy, "
|
||||
"report/ignore/enospc/stop/auto",
|
||||
.enum_table = BlockdevOnError_lookup,
|
||||
.get = get_enum,
|
||||
.set = set_enum,
|
||||
};
|
||||
|
||||
/* --- BIOS CHS translation */
|
||||
|
||||
QEMU_BUILD_BUG_ON(sizeof(BiosAtaTranslation) != sizeof(int));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue