aboutsummaryrefslogtreecommitdiff
path: root/block/vmdk.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-10-31 10:23:15 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-10-31 10:23:15 -0500
commit3a069ff11b9178a84f560435b2fd22294d839018 (patch)
treea5ffe92f5909b26fc77af69d7f5e05f1e20fe268 /block/vmdk.c
parentacba391493badb972db654fa1299052fce0379a3 (diff)
parent3899edf7e4a13439793aaad21a17863a3b9152c2 (diff)
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Diffstat (limited to 'block/vmdk.c')
-rw-r--r--block/vmdk.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/vmdk.c b/block/vmdk.c
index 6be592ffd6..e93828eeae 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -208,7 +208,7 @@ static void vmdk_free_last_extent(BlockDriverState *bs)
static uint32_t vmdk_read_cid(BlockDriverState *bs, int parent)
{
char desc[DESC_SIZE];
- uint32_t cid;
+ uint32_t cid = 0xffffffff;
const char *p_name, *cid_str;
size_t cid_str_size;
BDRVVmdkState *s = bs->opaque;
@@ -1407,7 +1407,6 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options)
bdrv_delete(bs);
return -EINVAL;
}
- filesize = bdrv_getlength(bs);
parent_cid = vmdk_read_cid(bs, 0);
bdrv_delete(bs);
relative_path(parent_filename, sizeof(parent_filename),