Hi Aaron, Am 28.07.2010 04:01, schrieb Aaron Mason: > I tried this once before using command-line parameters and it was > knocked back. Someone made the mention of using options so I had a > look and saw that it was really simple to do. > > The following is a patch from the latest Git snapshot. I have also > attached it (in case it gets broken by Gmail) and uploaded it to > http://milo.thats-too-much.info/qemu-vmdk_gen_scsi.patch (in case the > mailing list prohibits attachments).
Needs a Signed-off-by line. Also please use "[PATCH]" instead of "PATCH:" in the subject line so that git am automatically removes it when applying the patch. You get a correctly formatted mail with git format-patch. And yes, your mailer has broken the patch, so adding the attachment was a good idea (using git send-email would be even better, though). > diff --git a/block/vmdk.c b/block/vmdk.c > index 2d4ba42..b60d86f 100644 > --- a/block/vmdk.c > +++ b/block/vmdk.c > @@ -686,9 +686,9 @@ static int vmdk_create(const char *filename, > QEMUOptionParameter *options) > "ddb.geometry.cylinders = \"%" PRId64 "\"\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; > + const char *real_filename, *temp_str, *adapter_type = "ide"; > int64_t total_size = 0; > const char *backing_file = NULL; > int flags = 0; > @@ -702,6 +702,15 @@ static int vmdk_create(const char *filename, > QEMUOptionParameter *options) > backing_file = options->value.s; > } else if (!strcmp(options->name, BLOCK_OPT_COMPAT6)) { > flags |= options->value.n ? BLOCK_FLAG_COMPAT6: 0; > + } else if (!strcmp(options->name, BLOCK_OPT_ADAPTER)) { > + if (options->value.s != NULL) { > + if (!strcmp(options->value.s, "ide") || \ > + !strcmp(options->value.s, "buslogic") || \ > + !strcmp(options->value.s, "lsilogic")) { > + adapter_type = options->value.s; > + } else > + return -1; > + } qemu uses four spaces for indentation, tabs are not allowed. Also, a \ at the end of a line is not needed. The logic of the patch looks okay, so please send a v2 with just these formal things fixed. Kevin