=== modified file 'block-vmdk.c' --- block-vmdk.c 2007-11-11 02:51:15 +0000 +++ block-vmdk.c 2008-01-06 21:18:57 +0000 @@ -717,7 +717,7 @@ "ddb.geometry.cylinders = \"%lu\"\n" "ddb.geometry.heads = \"16\"\n" "ddb.geometry.sectors = \"63\"\n" - "ddb.adapterType = \"ide\"\n"; + "ddb.adapterType = \"%s\"\n"; char desc[1024]; const char *real_filename, *temp_str; @@ -790,7 +790,7 @@ if ((temp_str = strrchr(real_filename, ':')) != NULL) real_filename = temp_str + 1; sprintf(desc, desc_template, time(NULL), (unsigned long)total_size, - real_filename, (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), total_size / (63 * 16)); + real_filename, (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), total_size / (63 * 16), (flags & BLOCK_FLAG_SCSI ? "lsilogic" : "ide")); /* write the descriptor */ lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET); === modified file 'block_int.h' --- block_int.h 2007-12-24 16:10:43 +0000 +++ block_int.h 2008-01-06 21:18:57 +0000 @@ -29,6 +29,7 @@ #define BLOCK_FLAG_ENCRYPT 1 #define BLOCK_FLAG_COMPRESS 2 #define BLOCK_FLAG_COMPAT6 4 +#define BLOCK_FLAG_SCSI 8 struct BlockDriver { const char *format_name; === modified file 'qemu-img.c' --- qemu-img.c 2008-01-06 17:21:48 +0000 +++ qemu-img.c 2008-01-06 22:04:55 +0000 @@ -88,9 +88,9 @@ "QEMU disk image utility\n" "\n" "Command syntax:\n" - " create [-e] [-6] [-b base_image] [-f fmt] filename [size]\n" + " create [-e] [-6] [-s] [-b base_image] [-f fmt] filename [size]\n" " commit [-f fmt] filename\n" - " convert [-c] [-e] [-6] [-f fmt] filename [filename2 [...]] [-O output_fmt] output_filename\n" + " convert [-c] [-e] [-6] [-s] [-f fmt] filename [-O output_fmt] output_filename\n" " info [-f fmt] filename\n" "\n" "Command parameters:\n" @@ -105,6 +105,7 @@ " '-c' indicates that target image must be compressed (qcow format only)\n" " '-e' indicates that the target image must be encrypted (qcow format only)\n" " '-6' indicates that the target image must use compatibility level 6 (vmdk format only)\n" + " '-s' indicates that the target image must use of type SCSI (vmdk format only)\n" ); printf("\nSupported format:"); bdrv_iterate_format(format_print, NULL); @@ -261,6 +262,9 @@ case '6': flags |= BLOCK_FLAG_COMPAT6; break; + case 's': + flags |= BLOCK_FLAG_SCSI; + break; } } if (optind >= argc) @@ -297,6 +301,8 @@ printf(", encrypted"); if (flags & BLOCK_FLAG_COMPAT6) printf(", compatibility level=6"); + if (flags & BLOCK_FLAG_SCSI) + printf(", type=scsi"); if (base_filename) { printf(", backing_file=%s", base_filename); @@ -473,6 +479,8 @@ error("Encryption not supported for this file format"); if (flags & BLOCK_FLAG_COMPAT6 && drv != &bdrv_vmdk) error("Alternative compatibility level not supported for this file format"); + if (flags & BLOCK_FLAG_SCSI && drv != &bdrv_vmdk) + error("SCSI disks are not supported for this file format"); if (flags & BLOCK_FLAG_ENCRYPT && flags & BLOCK_FLAG_COMPRESS) error("Compression and encryption not supported at the same time");