diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-08-04 12:26:51 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-08-23 14:15:17 +0200 |
commit | c3993cdca39c252d65bbbcc234d8d242dc9bd693 (patch) | |
tree | fd31efb3149956a7fd09de821851b52ce2e20580 /block.h | |
parent | 12888904fe7f0231e853072805fb2317ec60c510 (diff) |
block: parse cache mode flags in a single place
This patch introduces bdrv_parse_cache_flags() which sets open flags
given a cache mode. Previously this was duplicated in blockdev.c and
qemu-img.c.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.h')
-rw-r--r-- | block.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -69,6 +69,7 @@ int bdrv_create_file(const char* filename, QEMUOptionParameter *options); BlockDriverState *bdrv_new(const char *device_name); void bdrv_make_anon(BlockDriverState *bs); void bdrv_delete(BlockDriverState *bs); +int bdrv_parse_cache_flags(const char *mode, int *flags); int bdrv_file_open(BlockDriverState **pbs, const char *filename, int flags); int bdrv_open(BlockDriverState *bs, const char *filename, int flags, BlockDriver *drv); |