Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jul 2006 09:16:59 -0700
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Paolo Pisati <piso@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 100756 for review
Message-ID:  <20060706161659.GB13815@odin.ac.hmc.edu>
In-Reply-To: <200607061448.k66EmJhT089494@repoman.freebsd.org>
References:  <200607061448.k66EmJhT089494@repoman.freebsd.org>

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

--v9Ux+11Zm5mwPlX6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jul 06, 2006 at 02:48:19PM +0000, Paolo Pisati wrote:
> http://perforce.freebsd.org/chv.cgi?CH=3D100756
>=20
> Change 100756 by piso@piso_newluxor on 2006/07/06 14:48:07
>=20
> 	C99 struct init: style(9) doesn't contemplate C99 struct
> 	init so i had to 'invent' by myself how to indent the code...

FYI, in the various GEOM files a full tab seems to be the norm.  i.e.
(from sys/geom/geom_ccd.c):

static struct g_class g_ccd_class =3D {
	.name =3D "CCD",
	.version =3D G_VERSION,
	.ctlreq =3D g_ccd_config,
	.destroy_geom =3D g_ccd_destroy_geom,
	.start =3D g_ccd_start,
	.orphan =3D g_ccd_orphan,
	.access =3D g_ccd_access,
};

-- Brooks

> Affected files ...
>=20
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_cuseeme.c=
#4 edit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_dummy.c#3=
 edit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_ftp.c#4 e=
dit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_irc.c#4 e=
dit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#4 e=
dit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_pptp.c#4 =
edit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_skinny.c#=
4 edit
> .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_smedia.c#=
4 edit
>=20
> Differences ...
>=20
> =3D=3D=3D=3D //depot/projects/soc2005/libalias/sys/netinet/libalias/alias=
_cuseeme.c#4 (text+ko) =3D=3D=3D=3D
>=20
> @@ -103,8 +103,23 @@
>  }
> =20
>  /* Kernel module definition. */
> -struct proto_handler handlers[] =3D {{120, OUT, UDP, &fingerprint, &prot=
ohandlerout},=20
> -			    {120, IN, UDP, &fingerprint, &protohandlerin}, {EOH}};
> +struct proto_handler handlers[] =3D {
> +	{=20
> +	  .pri =3D 120,=20
> +	  .dir =3D OUT,=20
> +	  .proto =3D UDP,=20
> +	  .fingerprint =3D &fingerprint,=20
> +	  .protohandler =3D &protohandlerout
> +	},=20
> +	{
> +	  .pri =3D 120,=20
> +	  .dir =3D IN,=20
> +	  .proto =3D UDP,=20
> +	  .fingerprint =3D &fingerprint,=20
> +	  .protohandler =3D &protohandlerin
> +	},=20
> +	{ EOH }
> +};
> =20
>  static int
>  mod_handler(module_t mod, int type, void *data)
>=20
> =3D=3D=3D=3D //depot/projects/soc2005/libalias/sys/netinet/libalias/alias=
_dummy.c#3 (text+ko) =3D=3D=3D=3D
>=20
> @@ -114,8 +114,16 @@
>   * THEIR EXACT NAMES: handlers and entries.
>   */
> =20
> -struct proto_handler handlers [] =3D {{666, IN|OUT, UDP|TCP, &fingerprin=
t,=20
> -			  &protohandler}, {EOH}};
> +struct proto_handler handlers [] =3D {
> +	{=20
> +	  .pri =3D 666,=20
> +	  .dir =3D IN|OUT,=20
> +	  .proto =3D UDP|TCP,=20
> +	  .fingerprint =3D &fingerprint,=20
> +	  .protohandler =3D &protohandler
> +	},=20
> +	{ EOH }
> +};
> =20
>  static int
>  mod_handler(module_t mod, int type, void *data)
>=20
> =3D=3D=3D=3D //depot/projects/soc2005/libalias/sys/netinet/libalias/alias=
_ftp.c#4 (text+ko) =3D=3D=3D=3D
>=20
> @@ -132,8 +132,16 @@
>  	return (0);
>  }
> =20
> -struct proto_handler handlers[] =3D {{80, OUT, TCP, &fingerprint,=20
> -			  &protohandler}, {EOH}};
> +struct proto_handler handlers[] =3D {
> +	{=20
> +	  .pri =3D 80,=20
> +	  .dir =3D OUT,=20
> +	  .proto =3D TCP,=20
> +	  .fingerprint =3D &fingerprint,=20
> +	  .protohandler =3D &protohandler
> +	},=20
> +	{ EOH }
> +};
> =20
>  static int
>  mod_handler(module_t mod, int type, void *data)
>=20
> =3D=3D=3D=3D //depot/projects/soc2005/libalias/sys/netinet/libalias/alias=
_irc.c#4 (text+ko) =3D=3D=3D=3D
>=20
> @@ -121,8 +121,16 @@
>  	return (0);
>  }
> =20
> -struct proto_handler handlers[] =3D {{90, OUT, TCP, &fingerprint,=20
> -			     &protohandler}, {EOH}};
> +struct proto_handler handlers[] =3D {
> +	{=20
> +	  .pri =3D 90,=20
> +	  .dir =3D OUT,=20
> +	  .proto =3D TCP,=20
> +	  .fingerprint =3D &fingerprint,=20
> +	  .protohandler =3D &protohandler
> +	},=20
> +	{ EOH }
> +};
> =20
>  static int
>  mod_handler(module_t mod, int type, void *data) {
>=20
> =3D=3D=3D=3D //depot/projects/soc2005/libalias/sys/netinet/libalias/alias=
_nbt.c#4 (text+ko) =3D=3D=3D=3D
>=20
> @@ -136,8 +136,23 @@
>  }
> =20
>  /* Kernel module definition. */
> -struct proto_handler handlers[] =3D {{130, IN|OUT, UDP, &fingerprint1, &=
protohandler1},=20
> -			    {140, IN|OUT, UDP, &fingerprint2, &protohandler2}, {EOH}};
> +struct proto_handler handlers[] =3D {
> +	{=20
> +	  .pri =3D 130,=20
> +	  .dir =3D IN|OUT,=20
> +	  .proto =3D UDP,=20
> +	  .fingerprint =3D &fingerprint1,=20
> +	  .protohandler =3D &protohandler1
> +	},=20
> +	{=20
> +	  .pri =3D 140,=20
> +	  .dir =3D IN|OUT,=20
> +	  .proto =3D UDP,=20
> +	  .fingerprint =3D &fingerprint2,=20
> +	  .protohandler =3D &protohandler2
> +	},=20
> +	{ EOH }
> +};
> =20
>  static int
>  mod_handler(module_t mod, int type, void *data)
>=20
> =3D=3D=3D=3D //depot/projects/soc2005/libalias/sys/netinet/libalias/alias=
_pptp.c#4 (text+ko) =3D=3D=3D=3D
>=20
> @@ -159,15 +159,42 @@
>  }
> =20
>  /* Kernel module definition. */
> -struct proto_handler handlers[] =3D {{200, IN, TCP, &fingerprint, &proto=
handlerin},
> -			    {210, OUT, TCP, &fingerprint, &protohandlerout},
> +struct proto_handler handlers[] =3D {
> +	{=20
> +	  .pri =3D 200,=20
> +	  .dir =3D IN,=20
> +	  .proto =3D TCP,=20
> +	  .fingerprint =3D &fingerprint,=20
> +	  .protohandler =3D &protohandlerin
> +	},
> +	{=20
> +	  .pri =3D 210,=20
> +	  .dir =3D OUT,=20
> +	  .proto =3D TCP,=20
> +	  .fingerprint =3D &fingerprint,=20
> +	  .protohandler =3D &protohandlerout
> +	},
>  /*=20
>   * WATCH OUT!!! these 2 handlers NEED a priority of INT_MAX (highest pos=
sible)=20
>   * cause they will ALWAYS process packets, so they must be the last one
>   * in chain: look fingerprintgre() above.
>   */
> -			    {INT_MAX, IN, IP, &fingerprintgre, &protohandlergrein},
> -			    {INT_MAX, OUT, IP, &fingerprintgre, &protohandlergreout}, {EOH}};
> +	{=20
> +	  .pri =3D INT_MAX,=20
> +	  .dir =3D IN,=20
> +	  .proto =3D IP,=20
> +	  .fingerprint =3D &fingerprintgre,=20
> +	  .protohandler =3D &protohandlergrein
> +	},
> +	{=20
> +	  .pri =3D INT_MAX,=20
> +	  .dir =3D OUT,=20
> +	  .proto =3D IP,=20
> +	  .fingerprint =3D &fingerprintgre,=20
> +	  .protohandler =3D &protohandlergreout
> +	},=20
> +	{ EOH }
> +};
>  static int
>  mod_handler(module_t mod, int type, void *data)
>  {
>=20
> =3D=3D=3D=3D //depot/projects/soc2005/libalias/sys/netinet/libalias/alias=
_skinny.c#4 (text+ko) =3D=3D=3D=3D
>=20
> @@ -91,8 +91,16 @@
>  	return (0);
>  }
> =20
> -struct proto_handler handlers[] =3D {{110, IN|OUT, TCP, &fingerprint,=20
> -			     &protohandler}, {EOH}};
> +struct proto_handler handlers[] =3D {
> +	{=20
> +	  .pri =3D 110,=20
> +	  .dir =3D IN|OUT,=20
> +	  .proto =3D TCP,=20
> +	  .fingerprint =3D &fingerprint,=20
> +	  .protohandler =3D &protohandler
> +	},=20
> +	{ EOH }
> +};
> =20
>  static int
>  mod_handler(module_t mod, int type, void *data)
>=20
> =3D=3D=3D=3D //depot/projects/soc2005/libalias/sys/netinet/libalias/alias=
_smedia.c#4 (text+ko) =3D=3D=3D=3D
>=20
> @@ -167,8 +167,16 @@
>  	return (0);
>  }
> =20
> -struct proto_handler handlers[] =3D {{100, OUT, TCP|UDP, &fingerprint,=
=20
> -			     &protohandler}, {EOH}};
> +struct proto_handler handlers[] =3D {
> +	{=20
> +	  .pri =3D 100,=20
> +	  .dir =3D OUT,=20
> +	  .proto =3D TCP|UDP,
> +	  .fingerprint =3D &fingerprint,=20
> +	  .protohandler =3D &protohandler
> +	},=20
> +	{ EOH }
> +};
> =20
>  static int
>  mod_handler(module_t mod, int type, void *data)
--=20
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

--v9Ux+11Zm5mwPlX6
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFErTd6XY6L6fI4GtQRAvRzAJ9UTVO860lnK+cKUxau+ZKPM7jwggCggODj
qmXBHBI7tKJ7bsWw9EzXvw4=
=QGqC
-----END PGP SIGNATURE-----

--v9Ux+11Zm5mwPlX6--



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