diff options
author | Max Reitz <mreitz@redhat.com> | 2013-09-03 10:09:50 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-09-12 10:12:46 +0200 |
commit | 6f176b48f9f98820ed192a1355cc1c7c08ddf46b (patch) | |
tree | 1f77aa683faf937eb091bd715e2fdd13d4714cdd /include | |
parent | 56e023af805215260c71d44f5b5a98087f4920d2 (diff) |
block: Image file option amendment
This patch adds the "amend" option to qemu-img which allows changing
image options on existing image files. It also adds the generic bdrv
implementation which is basically just a wrapper for the image format
specific function.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block.h | 2 | ||||
-rw-r--r-- | include/block/block_int.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h index 728ec1aebf..1c5f939d04 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -241,6 +241,8 @@ typedef enum { int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix); +int bdrv_amend_options(BlockDriverState *bs_new, QEMUOptionParameter *options); + /* async block I/O */ typedef void BlockDriverDirtyHandler(BlockDriverState *bs, int64_t sector, int sector_num); diff --git a/include/block/block_int.h b/include/block/block_int.h index 7c35198ad7..1541777d42 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -188,6 +188,9 @@ struct BlockDriver { int (*bdrv_check)(BlockDriverState* bs, BdrvCheckResult *result, BdrvCheckMode fix); + int (*bdrv_amend_options)(BlockDriverState *bs, + QEMUOptionParameter *options); + void (*bdrv_debug_event)(BlockDriverState *bs, BlkDebugEvent event); /* TODO Better pass a option string/QDict/QemuOpts to add any rule? */ |