diff options
author | Kevin Wolf <kwolf@redhat.com> | 2013-03-15 18:47:22 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-03-22 17:51:32 +0100 |
commit | 6963a30d82413bea36c7545137b090b284cc2b18 (patch) | |
tree | f4258be2af81298342b01f359790ea10ba5f856c /include | |
parent | f53a1febcd9d887149ac1429880a3f2fdb2c117f (diff) |
block: Introduce .bdrv_parse_filename callback
If a driver needs structured data and not just a string, it can provide
a .bdrv_parse_filename callback now that parses the command line string
into separate options. Keeping this separate from .bdrv_open_filename
ensures that the preferred way of directly specifying the options always
works as well if parsing the string works.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block_int.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index fb2a136774..1b06a11590 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -75,6 +75,7 @@ struct BlockDriver { int instance_size; int (*bdrv_probe)(const uint8_t *buf, int buf_size, const char *filename); int (*bdrv_probe_device)(const char *filename); + void (*bdrv_parse_filename)(const char *filename, QDict *options, Error **errp); /* For handling image reopen for split or non-split files */ int (*bdrv_reopen_prepare)(BDRVReopenState *reopen_state, |