Skip to content

Commit

Permalink
block: New bdrv_get_flags()
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Armbruster <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
  • Loading branch information
Markus Armbruster authored and kevmw committed Jun 15, 2012
1 parent b75a028 commit c843328
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions block.c
Original file line number Diff line number Diff line change
Expand Up @@ -2466,6 +2466,11 @@ const char *bdrv_get_device_name(BlockDriverState *bs)
return bs->device_name;
}

int bdrv_get_flags(BlockDriverState *bs)
{
return bs->open_flags;
}

void bdrv_flush_all(void)
{
BlockDriverState *bs;
Expand Down
1 change: 1 addition & 0 deletions block.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ int bdrv_query_missing_keys(void);
void bdrv_iterate_format(void (*it)(void *opaque, const char *name),
void *opaque);
const char *bdrv_get_device_name(BlockDriverState *bs);
int bdrv_get_flags(BlockDriverState *bs);
int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors);
int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi);
Expand Down

0 comments on commit c843328

Please sign in to comment.