aboutsummaryrefslogtreecommitdiff
path: root/block.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2012-06-13 10:11:48 +0200
committerKevin Wolf <kwolf@redhat.com>2012-06-15 14:03:43 +0200
commitf8d6bba1c1f56217d9ee71b7aee5f94f46c8f148 (patch)
tree55cfcd017b9a4bd29ddd6c79383dbb7f15393c4b /block.h
parentf085800e245836fed27fddb3b624a29326637657 (diff)
downloadqemu-f8d6bba1c1f56217d9ee71b7aee5f94f46c8f148.zip
qemu-f8d6bba1c1f56217d9ee71b7aee5f94f46c8f148.tar.gz
qemu-f8d6bba1c1f56217d9ee71b7aee5f94f46c8f148.tar.bz2
block: Replace bdrv_get_format() by bdrv_get_format_name()
So callers don't need to know anything about maximum name length. Returning a pointer is safe, because the name string lives as long as the block driver it names, and block drivers don't die. Requested by Peter Maydell. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.h')
-rw-r--r--block.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/block.h b/block.h
index 43bfd99..d135652 100644
--- a/block.h
+++ b/block.h
@@ -296,7 +296,7 @@ int bdrv_is_inserted(BlockDriverState *bs);
int bdrv_media_changed(BlockDriverState *bs);
void bdrv_lock_medium(BlockDriverState *bs, bool locked);
void bdrv_eject(BlockDriverState *bs, bool eject_flag);
-void bdrv_get_format(BlockDriverState *bs, char *buf, int buf_size);
+const char *bdrv_get_format_name(BlockDriverState *bs);
BlockDriverState *bdrv_find(const char *name);
BlockDriverState *bdrv_next(BlockDriverState *bs);
void bdrv_iterate(void (*it)(void *opaque, BlockDriverState *bs),