svn commit: r344191 - head/sbin/nvmecontrol

Warner Losh imp at bsdimp.com
Sat Feb 16 07:03:33 UTC 2019


On Fri, Feb 15, 2019, 11:42 PM Enji Cooper <yaneurabeya at gmail.com wrote:

>
> On Feb 15, 2019, at 10:25 PM, Warner Losh <imp at bsdimp.com> wrote:
>
> On Fri, Feb 15, 2019, 9:55 PM Enji Cooper <yaneurabeya at gmail.com wrote:
>
>>
>> > On Feb 15, 2019, at 16:15, Warner Losh <imp at freebsd.org> wrote:
>> >
>> > Author: imp
>> > Date: Sat Feb 16 00:15:02 2019
>> > New Revision: 344191
>> > URL: https://svnweb.freebsd.org/changeset/base/344191
>> >
>> > Log:
>> >  Remove write-only s_flag.
>> >
>> > Modified:
>> >  head/sbin/nvmecontrol/firmware.c
>> >
>> > Modified: head/sbin/nvmecontrol/firmware.c
>> >
>> ==============================================================================
>> > --- head/sbin/nvmecontrol/firmware.c    Fri Feb 15 23:46:34 2019
>> (r344190)
>> > +++ head/sbin/nvmecontrol/firmware.c    Sat Feb 16 00:15:02 2019
>> (r344191)
>> > @@ -177,7 +177,7 @@ static void
>> > firmware(const struct nvme_function *nf, int argc, char *argv[])
>> > {
>> >    int                fd = -1, slot = 0;
>> > -    int                a_flag, s_flag, f_flag;
>> > +    int                a_flag, f_flag;
>> >    int                activate_action, reboot_required;
>> >    int                opt;
>> >    char                *p, *image = NULL;
>> > @@ -188,7 +188,7 @@ firmware(const struct nvme_function *nf, int argc,
>> cha
>> >    uint8_t                fw_slot1_ro, fw_num_slots;
>> >    struct nvme_controller_data    cdata;
>> >
>> > -    a_flag = s_flag = f_flag = false;
>> > +    a_flag = f_flag = false;
>> >
>> >    while ((opt = getopt(argc, argv, "af:s:")) != -1) {
>>
>> Hi Warner!
>>     Should “s:” be removed here, along with any corresponding
>> documentation about ‘-s foo’?
>>
>
> The docs are poo. s: should not be removed, since it is the slot and
> required. The code set slot and s_flag. The latter is bogus, so I removed
> it.
>
>
> 0-o.. I see. Ok, carry on!
>

I have other improvements that are real in the pipe, including plans to fix
the docs. Just slogging through the details right now when I have time...
But since I noticed this and it was independent and a no brainer, I did
this first.

Warner


More information about the svn-src-head mailing list