Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Feb 2019 23:25:20 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Garrett Cooper <yaneurabeya@gmail.com>
Cc:        Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r344191 - head/sbin/nvmecontrol
Message-ID:  <CANCZdfqyHws0YDzqpALoCMUZ2sT-m9KzA1yFM9iR9zYTSeE5=Q@mail.gmail.com>
In-Reply-To: <EBC9A98F-5E80-458F-927E-38948C0BC913@gmail.com>
References:  <201902160015.x1G0F3EJ060777@repo.freebsd.org> <EBC9A98F-5E80-458F-927E-38948C0BC913@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 15, 2019, 9:55 PM Enji Cooper <yaneurabeya@gmail.com wrote:

>
> > On Feb 15, 2019, at 16:15, Warner Losh <imp@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
> >
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> > --- 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 =3D -1, slot =3D 0;
> > -    int                a_flag, s_flag, f_flag;
> > +    int                a_flag, f_flag;
> >    int                activate_action, reboot_required;
> >    int                opt;
> >    char                *p, *image =3D 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 =3D s_flag =3D f_flag =3D false;
> > +    a_flag =3D f_flag =3D false;
> >
> >    while ((opt =3D getopt(argc, argv, "af:s:")) !=3D -1) {
>
> Hi Warner!
>     Should =E2=80=9Cs:=E2=80=9D be removed here, along with any correspon=
ding
> documentation about =E2=80=98-s foo=E2=80=99?
>

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.

Warner

>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqyHws0YDzqpALoCMUZ2sT-m9KzA1yFM9iR9zYTSeE5=Q>