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:
parent
b75a02829d
commit
c843328783
5
block.c
5
block.c
@ -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;
|
||||
|
1
block.h
1
block.h
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user