aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-10-07 13:59:03 +0200
committerKevin Wolf <kwolf@redhat.com>2014-10-20 13:41:26 +0200
commite4e9986b1caebebdbe53d6f9ad5b03d5ba83f4c3 (patch)
tree5474e234274b093ee621ebc43730bc666b53af4a /include/block
parentec0de76874462c745a1600911bd81ee0253c0c23 (diff)
block: Split bdrv_new_root() off bdrv_new()
Creating an anonymous BDS can't fail. Make that obvious. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: BenoƮt Canet <benoit.canet@nodalink.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 3318f0dfbe..a3039ce6f7 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -204,7 +204,8 @@ BlockDriver *bdrv_find_whitelisted_format(const char *format_name,
int bdrv_create(BlockDriver *drv, const char* filename,
QemuOpts *opts, Error **errp);
int bdrv_create_file(const char *filename, QemuOpts *opts, Error **errp);
-BlockDriverState *bdrv_new(const char *device_name, Error **errp);
+BlockDriverState *bdrv_new_root(const char *device_name, Error **errp);
+BlockDriverState *bdrv_new(void);
void bdrv_make_anon(BlockDriverState *bs);
void bdrv_swap(BlockDriverState *bs_new, BlockDriverState *bs_old);
void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top);