block: New bdrv_get_flags()

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Markus Armbruster 2012-06-05 16:49:24 +02:00 committed by Kevin Wolf
parent b75a02829d
commit c843328783
2 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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);