Re: [RFC] usage_msg_opt() and _optf() must die

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

>> I am very much tempted to suggest us do this.
>>
>>  void NORETURN usage_msg_opt(const char *msg,
>> -                  const char * const *usagestr,
>> -                  const struct option *options)
>> +                  const char * const *usagestr UNUSED,
>> +                  const struct option *options UNUSED)
>>  {
>> -       die_message("%s\n", msg); /* The extra \n is intentional */
>> -       usage_with_options(usagestr, options);
>> +       die("%s", msg);
>>  }
>
> As a minimal "fix" to eliminate the user-hostile behavior, I would be
> very much in favor of this change.
>
> (Retiring `usage_msg_opt` altogether would be even better, but is much
> more invasive.)

The above is following the usual "we make changes but be nice to in
flight topics by keeping the API function still available, but the
function now behaves better" pattern.  In other words, elimination
of the API function is a breaking change and can go slower.  What
needs more urgent to get to that goal would be to adjust the tests
and documentation pages to the fallout from the above single liner.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux