aboutsummaryrefslogtreecommitdiff
path: root/block-vmdk.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-28 20:00:14 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-28 20:00:14 +0000
commit7fd6d9fc876fd9a6863cd2300e703f52f8262413 (patch)
tree684f564b774a62bff82f4457b457657d71284150 /block-vmdk.c
parentc9b1ae2cfd25e3ad88c6ef61d18eaefd177a5e49 (diff)
Fix warning, based on patches by Zeev Tarantov and Jindrich Makovicka
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5340 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-vmdk.c')
-rw-r--r--block-vmdk.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/block-vmdk.c b/block-vmdk.c
index 8d67c2f149..c49b67193c 100644
--- a/block-vmdk.c
+++ b/block-vmdk.c
@@ -710,13 +710,13 @@ static int vmdk_create(const char *filename, int64_t total_size,
"createType=\"monolithicSparse\"\n"
"\n"
"# Extent description\n"
- "RW %lu SPARSE \"%s\"\n"
+ "RW %" PRId64 " SPARSE \"%s\"\n"
"\n"
"# The Disk Data Base \n"
"#DDB\n"
"\n"
"ddb.virtualHWVersion = \"%d\"\n"
- "ddb.geometry.cylinders = \"%lu\"\n"
+ "ddb.geometry.cylinders = \"%" PRId64 "\"\n"
"ddb.geometry.heads = \"16\"\n"
"ddb.geometry.sectors = \"63\"\n"
"ddb.adapterType = \"ide\"\n";
@@ -792,8 +792,9 @@ static int vmdk_create(const char *filename, int64_t total_size,
if ((temp_str = strrchr(real_filename, ':')) != NULL)
real_filename = temp_str + 1;
snprintf(desc, sizeof(desc), desc_template, (unsigned int)time(NULL),
- (unsigned long)total_size, real_filename,
- (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), total_size / (63 * 16));
+ total_size, real_filename,
+ (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4),
+ total_size / (int64_t)(63 * 16));
/* write the descriptor */
lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET);