aboutsummaryrefslogtreecommitdiff
path: root/block.h
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2010-12-16 13:52:15 +0100
committerKevin Wolf <kwolf@redhat.com>2010-12-17 16:11:03 +0100
commitf88e1a4201e31cac0438df395dfcdd45ac35c17d (patch)
treeb3486398166f236d7ae47b9eb1f941e9441b6ae3 /block.h
parent53f76e5857b66dd7fa90efa9ea8326eff5aa693f (diff)
qemu-img.c: Re-factor img_create()
This patch re-factors img_create() moving the code doing the actual work into block.c where it can be shared with QEMU. This is needed to be able to create images from QEMU to be used for live snapshots. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.h')
-rw-r--r--block.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/block.h b/block.h
index 78ecfac343..b812172735 100644
--- a/block.h
+++ b/block.h
@@ -227,6 +227,10 @@ int bdrv_save_vmstate(BlockDriverState *bs, const uint8_t *buf,
int bdrv_load_vmstate(BlockDriverState *bs, uint8_t *buf,
int64_t pos, int size);
+int bdrv_img_create(const char *filename, const char *fmt,
+ const char *base_filename, const char *base_fmt,
+ char *options, uint64_t img_size, int flags);
+
#define BDRV_SECTORS_PER_DIRTY_CHUNK 2048
void bdrv_set_dirty_tracking(BlockDriverState *bs, int enable);