summaryrefslogtreecommitdiff
path: root/block-vmdk.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-16 21:59:02 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-16 21:59:02 +0000
commitec36ba14748e140dda237ba22ad3135e360b0d9f (patch)
treebcaa0fe4961882998a3acb19f225be006ab92a57 /block-vmdk.c
parent3ae43202754711808ea5186e327bfd0533dd88fc (diff)
vmdk compatibility level 6 images, by Soren Hansen.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3175 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-vmdk.c')
-rw-r--r--block-vmdk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block-vmdk.c b/block-vmdk.c
index 197fb5a620..436241c79b 100644
--- a/block-vmdk.c
+++ b/block-vmdk.c
@@ -712,7 +712,7 @@ static int vmdk_create(const char *filename, int64_t total_size,
"# The Disk Data Base \n"
"#DDB\n"
"\n"
- "ddb.virtualHWVersion = \"4\"\n"
+ "ddb.virtualHWVersion = \"%d\"\n"
"ddb.geometry.cylinders = \"%lu\"\n"
"ddb.geometry.heads = \"16\"\n"
"ddb.geometry.sectors = \"63\"\n"
@@ -789,7 +789,7 @@ static int vmdk_create(const char *filename, int64_t total_size,
if ((temp_str = strrchr(real_filename, ':')) != NULL)
real_filename = temp_str + 1;
sprintf(desc, desc_template, time(NULL), (unsigned long)total_size,
- real_filename, total_size / (63 * 16));
+ real_filename, (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), total_size / (63 * 16));
/* write the descriptor */
lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET);