On 14.05.20 18:10, Eric Blake wrote:
> On 5/14/20 7:28 AM, Max Reitz wrote:
>> On 10.05.20 15:40, Maxim Levitsky wrote:
>>> Some options are only useful for creation
>>> (or hard to be amended, like cluster size for qcow2), while some other
>>> options are only useful for amend, like upcoming keyslot management
>>> options for luks
>>>
>
>>> +#define QCOW_COMMON_OPTIONS \
>>> + { \
>
>>> + .help = "Width of a reference count entry in bits", \
>>> + .def_value_str = "16" \
>>> + } \
>>
>> I think the last line should have a comma in it (otherwise the final
>> backslash doesn’t make much sense, because whenever we’d add a new
>> option, we would need to modify the line anyway to insert a comma).
>
> Except that...
>
>>
>> Speaking of adding option, this requires a rebase due to the
>> compression_type option added (not trivial in the strict sense, but
>> still straightforward to handle).
>>
>>> +
>>> static QemuOptsList qcow2_create_opts = {
>>> .name = "qcow2-create-opts",
>>> .head = QTAILQ_HEAD_INITIALIZER(qcow2_create_opts.head),
>>> .desc = {
>>>
>>
>> [...]
>>
>>> + QCOW_COMMON_OPTIONS,
>>> + { /* end of list */ }
>
> ...the intended usage is to use the macro name followed by a comma, so
> including a trailing comma in the macro itself would lead to a syntax
> error.But why is that the indended usage? Is there something in our coding style that forbids macros that don’t allow a separator to be placed after them? Max
signature.asc
Description: OpenPGP digital signature
