qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH RFC] remove QEMUOptionParameter
Date: Fri, 07 Sep 2012 13:42:15 +0200	[thread overview]
Message-ID: <5049DD97.6000806@redhat.com> (raw)
In-Reply-To: <87392u8brf.fsf@blackfin.pond.sub.org>

Am 07.09.2012 10:42, schrieb Markus Armbruster:
>> @@ -1628,51 +1625,6 @@ static int qcow2_load_vmstate(BlockDriverState *bs, uint8_t *buf,
>>      return ret;
>>  }
>>  
>> -static QEMUOptionParameter qcow2_create_options[] = {
>> -    {
>> -        .name = BLOCK_OPT_SIZE,
>> -        .type = OPT_SIZE,
>> -        .help = "Virtual disk size"
>> -    },
>> -    {
>> -        .name = BLOCK_OPT_COMPAT_LEVEL,
>> -        .type = OPT_STRING,
>> -        .help = "Compatibility level (0.10 or 1.1)"
>> -    },
>> -    {
>> -        .name = BLOCK_OPT_BACKING_FILE,
>> -        .type = OPT_STRING,
>> -        .help = "File name of a base image"
>> -    },
>> -    {
>> -        .name = BLOCK_OPT_BACKING_FMT,
>> -        .type = OPT_STRING,
>> -        .help = "Image format of the base image"
>> -    },
>> -    {
>> -        .name = BLOCK_OPT_ENCRYPT,
>> -        .type = OPT_FLAG,
>> -        .help = "Encrypt the image"
>> -    },
>> -    {
>> -        .name = BLOCK_OPT_CLUSTER_SIZE,
>> -        .type = OPT_SIZE,
>> -        .help = "qcow2 cluster size",
>> -        .value = { .n = DEFAULT_CLUSTER_SIZE },
>> -    },
>> -    {
>> -        .name = BLOCK_OPT_PREALLOC,
>> -        .type = OPT_STRING,
>> -        .help = "Preallocation mode (allowed values: off, metadata)"
>> -    },
>> -    {
>> -        .name = BLOCK_OPT_LAZY_REFCOUNTS,
>> -        .type = OPT_FLAG,
>> -        .help = "Postpone refcount updates",
>> -    },
>> -    { NULL }
>> -};
>> -
> 
> Replacement moves to qemu-config.c.  Not sure that's an improvement, but
> it's how QemuOpts generally work.  For an exception, see QemuOptsList
> use in blkdebug.c.

Yes, please follow the example of blkdebug.c. There's no reason to have
these QemuOptsLists global as they don't make sense in a qemu config file.

Another important reason is that in order to add or remove a file
format, you don't have to change anything outside the image format
implementation, you just link an additional object file. Moving part of
it into qemu-config.c hurts the modularity.

Kevin

  reply	other threads:[~2012-09-07 11:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06  3:13 [Qemu-devel] [PATCH RFC] remove QEMUOptionParameter Dong Xu Wang
2012-09-07  8:42 ` Markus Armbruster
2012-09-07 11:42   ` Kevin Wolf [this message]
2012-09-10  2:10   ` Dong Xu Wang
2012-09-10 17:38   ` Luiz Capitulino
2012-09-11  1:57     ` Dong Xu Wang
2012-09-11 12:10       ` Luiz Capitulino
2012-09-20  3:10   ` Dong Xu Wang
2012-09-20  9:16     ` Markus Armbruster
2012-09-20 12:36     ` Luiz Capitulino
     [not found] <505BD440.9010302@vnet.linux.ibm.com>
2012-09-21  2:47 ` Dong Xu Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5049DD97.6000806@redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wdongxu@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).