[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] Consolidate printing of block driver option
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] Consolidate printing of block driver options |
Date: |
Fri, 3 Dec 2010 10:59:36 +0000 |
On Fri, Dec 3, 2010 at 10:57 AM, Stefan Hajnoczi <address@hidden> wrote:
> On Thu, Dec 2, 2010 at 5:46 PM, <address@hidden> wrote:
>> @@ -694,6 +720,11 @@ static int img_convert(int argc, char **argv)
>>
>> out_filename = argv[argc - 1];
>>
>> + if (options && !strcmp(options, "?")) {
>> + ret = print_block_option_help(out_filename, out_fmt);
>> + goto out2;
>> + }
>> +
>> if (bs_n > 1 && out_baseimg) {
>> error("-B makes no sense when concatenating multiple input images");
>> return 1;
>> @@ -749,10 +780,6 @@ static int img_convert(int argc, char **argv)
>> drv->create_options);
>> create_options = append_option_parameters(create_options,
>> proto_drv->create_options);
>> - if (options && !strcmp(options, "?")) {
>> - print_option_help(create_options);
>> - goto out;
>> - }
>>
>> if (options) {
>> param = parse_option_parameters(options, create_options, param);
>> @@ -984,6 +1011,7 @@ out:
>> }
>> }
>> free(bs);
>> +out2:
>
> Not needed, out is fine. All those free functions are nops on NULL pointers.
Sorry, my comment is incorrect. It is possible for bs_n > 0 and we'll
try to free bs[i].
Stefan