Revision 95a2f9bc block/vdi.c
b/block/vdi.c | ||
---|---|---|
411 | 411 |
/* We only support data blocks which start on a sector boundary. */ |
412 | 412 |
logout("unsupported data offset 0x%x B\n", header.offset_data); |
413 | 413 |
goto fail; |
414 |
} else if (header.disk_size % SECTOR_SIZE != 0) { |
|
415 |
logout("unsupported disk size %" PRIu64 " B\n", header.disk_size); |
|
416 |
goto fail; |
|
414 | 417 |
} else if (header.sector_size != SECTOR_SIZE) { |
415 | 418 |
logout("unsupported sector size %u B\n", header.sector_size); |
416 | 419 |
goto fail; |
417 | 420 |
} else if (header.block_size != 1 * MiB) { |
418 | 421 |
logout("unsupported block size %u B\n", header.block_size); |
419 | 422 |
goto fail; |
420 |
} else if (header.disk_size !=
|
|
421 |
(uint64_t)header.blocks_in_image * header.block_size) {
|
|
423 |
} else if ((header.disk_size + header.block_size - 1) / header.block_size !=
|
|
424 |
(uint64_t)header.blocks_in_image) { |
|
422 | 425 |
logout("unexpected block number %u B\n", header.blocks_in_image); |
423 | 426 |
goto fail; |
424 | 427 |
} else if (!uuid_is_null(header.uuid_link)) { |
Also available in: Unified diff