diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2010-12-16 13:52:15 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-12-17 16:11:03 +0100 |
commit | f88e1a4201e31cac0438df395dfcdd45ac35c17d (patch) | |
tree | b3486398166f236d7ae47b9eb1f941e9441b6ae3 /block.h | |
parent | 53f76e5857b66dd7fa90efa9ea8326eff5aa693f (diff) | |
download | qemu-f88e1a4201e31cac0438df395dfcdd45ac35c17d.zip qemu-f88e1a4201e31cac0438df395dfcdd45ac35c17d.tar.gz qemu-f88e1a4201e31cac0438df395dfcdd45ac35c17d.tar.bz2 |
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.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |