Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2019 18:57:14 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Mark Johnston <markj@freebsd.org>
Cc:        Ian Lepore <ian@freebsd.org>, Brooks Davis <brooks@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r343305 - head/sys/net
Message-ID:  <20190122185714.GA77653@spindle.one-eyed-alien.net>
In-Reply-To: <20190122181257.GA81189@raichu>
References:  <201901221739.x0MHdQps047360@repo.freebsd.org> <f2e1c8577fcb3726d97b3254635804007037859f.camel@freebsd.org> <20190122181257.GA81189@raichu>

next in thread | previous in thread | raw e-mail | index | archive | help

--lrZ03NoBR/3+SXJZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 22, 2019 at 01:12:57PM -0500, Mark Johnston wrote:
> On Tue, Jan 22, 2019 at 10:45:16AM -0700, Ian Lepore wrote:
> > On Tue, 2019-01-22 at 17:39 +0000, Brooks Davis wrote:
> > > Author: brooks
> > > Date: Tue Jan 22 17:39:26 2019
> > > New Revision: 343305
> > > URL: https://svnweb.freebsd.org/changeset/base/343305
> > >=20
> > > Log:
> > >   Rework CASE_IOC_IFGROUPREQ() to require a case before the macro.
> > >  =20
> > >   This is more compatible with formatting tools and looks more
> > > normal.
> > >  =20
> > >   Reported by:	jhb (on a different review)
> > >   Sponsored by:	DARPA, AFRL
> > >   Differential Revision:	https://reviews.freebsd.org/D18442
> > >=20
> > > Modified:
> > >   head/sys/net/if.c
> > >=20
> > > Modified: head/sys/net/if.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/sys/net/if.c	Tue Jan 22 17:34:53 2019	(r343304)
> > > +++ head/sys/net/if.c	Tue Jan 22 17:39:26 2019	(r343305)
> > > @@ -168,14 +168,14 @@ struct ifmediareq32 {
> > >  #define	SIOCGIFXMEDIA32	_IOC_NEWTYPE(SIOCGIFXMEDIA, struct
> > > ifmediareq32)
> > > =20
> > >  #define	_CASE_IOC_IFGROUPREQ_32(cmd)			=09
> > > \
> > > -    case _IOC_NEWTYPE((cmd), struct ifgroupreq32):
> > > +    _IOC_NEWTYPE((cmd), struct ifgroupreq32): case
> >=20
> > That 'case' at the end of the line doesn't look right.
>=20
> With the change, CASE_IOC_IFGROUPREQ(cmd) yields
>=20
>   case <cmd>32: case <cmd>:
>=20
> which seems to be the intent.

This is the intent.  This macro avoids a pile of #ifdef macros in the
actual code (and makes more sense in my upstream branch where I have
another set of ioctl values).

-- Brooks

--lrZ03NoBR/3+SXJZ
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJcR2eKAAoJEKzQXbSebgfAOZMH/AsOazzb8/739uR36FiMCnov
8nJ9RrKUo2QYjvgsoHQi6yW+ol8NzZNyohKZgjt127l70I4Gdes0aovLSi8Rwkjn
vaRsu0N4c9DqqVpZvRYPeU6feVC1FGCXie8HHZY8JpLHsJBgXBnZDnGZhodgNFqq
xhFBhSBb5AWIOC0VIq1puCc76sTYUcu5KSS60ioxjpFzPH/7Iy34/F+pn2WeqtVU
MwKmyxwmQKKC5GmJgIAdGDGD9cDC450p/Gj0Ix7tRx67eOElFfBf+7lHPdoPLbqV
9WLiwMOcyyuLQhgB4A93wowCohvhij8SSKKUxt8NcWEltyIUHHYo876XUUO2B3o=
=8ILk
-----END PGP SIGNATURE-----

--lrZ03NoBR/3+SXJZ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190122185714.GA77653>