diff options
Diffstat (limited to 'block/vmdk.c')
-rw-r--r-- | block/vmdk.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/block/vmdk.c b/block/vmdk.c index 65ae0119c4..975e1d41ff 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -561,6 +561,15 @@ static int vmdk_open_vmdk4(BlockDriverState *bs, header = footer.header; } + if (le32_to_cpu(header.version) >= 3) { + char buf[64]; + snprintf(buf, sizeof(buf), "VMDK version %d", + le32_to_cpu(header.version)); + qerror_report(QERR_UNKNOWN_BLOCK_FORMAT_FEATURE, + bs->device_name, "vmdk", buf); + return -ENOTSUP; + } + l1_entry_sectors = le32_to_cpu(header.num_gtes_per_gte) * le64_to_cpu(header.granularity); if (l1_entry_sectors == 0) { |