mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
block: Add a 'mutable_opts' field to BlockDriver
If we reopen a BlockDriverState and there is an option that is present in bs->options but missing from the new set of options then we have to return an error unless the driver is able to reset it to its default value. This patch adds a new 'mutable_opts' field to BlockDriver. This is a list of runtime options that can be modified during reopen. If an option in this list is unspecified on reopen then it must be reset (or return an error). Signed-off-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
cb828c31de
commit
8a2ce0bc1e
4 changed files with 42 additions and 0 deletions
|
@ -383,6 +383,14 @@ struct BlockDriver {
|
|||
|
||||
/* List of options for creating images, terminated by name == NULL */
|
||||
QemuOptsList *create_opts;
|
||||
/*
|
||||
* If this driver supports reopening images this contains a
|
||||
* NULL-terminated list of the runtime options that can be
|
||||
* modified. If an option in this list is unspecified during
|
||||
* reopen then it _must_ be reset to its default value or return
|
||||
* an error.
|
||||
*/
|
||||
const char *const *mutable_opts;
|
||||
|
||||
/*
|
||||
* Returns 0 for completed check, -errno for internal errors.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue