From owner-freebsd-net@FreeBSD.ORG Fri May 28 07:56:48 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1B2516A4CF; Fri, 28 May 2004 07:56:48 -0700 (PDT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id C39AB43D41; Fri, 28 May 2004 07:56:47 -0700 (PDT) (envelope-from glebius@cell.sick.ru) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.9/8.12.8) with ESMTP id i4SEu4vw045189 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 May 2004 18:56:04 +0400 (MSD) (envelope-from glebius@cell.sick.ru) Received: (from glebius@localhost) by cell.sick.ru (8.12.9/8.12.6/Submit) id i4SEu35W045188; Fri, 28 May 2004 18:56:03 +0400 (MSD) Date: Fri, 28 May 2004 18:56:03 +0400 From: Gleb Smirnoff To: Roman Kurakin Message-ID: <20040528145603.GB45038@cell.sick.ru> Mail-Followup-To: Gleb Smirnoff , Roman Kurakin , Julian Elischer , freebsd-net@freebsd.org, Harti Brandt References: <20040528100914.GA43187@cell.sick.ru> <40B7439D.9030904@cronyx.ru> <20040528135516.GA44564@cell.sick.ru> <40B74D36.7040600@cronyx.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline In-Reply-To: <40B74D36.7040600@cronyx.ru> User-Agent: Mutt/1.5.6i cc: freebsd-net@freebsd.org cc: Harti Brandt cc: Julian Elischer Subject: Re: shutdown node VS disconnect all hooks X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2004 14:56:49 -0000 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=koi8-r Content-Disposition: inline On Fri, May 28, 2004 at 06:31:18PM +0400, Roman Kurakin wrote: R> >On Fri, May 28, 2004 at 05:50:21PM +0400, Roman Kurakin wrote: R> >R> >Here is the first one - convert all ng_type initializers to C99 sparse R> >R> >type. R> >R> > R> >R> Hey guys, it seems all of you forgot about device nodes :-) R> > R> >Which ones? Just point me and I'll send diffs. My fingers can already R> >convert R> >ng_type initializers to c99 without interaction with brain :) R> > R> /cronyx/CVSUP/FreeBSD-5x/src/sys > grep -R "\bng_type\b" * | grep -v R> "^netgraph" R> | grep -v "ctau" | grep -v "cp" | grep -v "cx" Thanks. Why did you skip your own nodes? R> dev/ar/if_ar.c:static struct ng_type typestruct = { R> dev/musycc/musycc.c:static struct ng_type ngtypestruct = { R> dev/sr/if_sr.c:static struct ng_type typestruct = { R> dev/usb/udbp.c:Static struct ng_type ng_udbp_typestruct = { R> i4b/driver/i4b_ing.c:static struct ng_type typestruct = { R> pci/if_mn.c:static struct ng_type mntypestruct = { here are the patches -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="if_ar.c.diff" Index: if_ar.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ar/if_ar.c,v retrieving revision 1.62 diff -u -r1.62 if_ar.c --- if_ar.c 17 Mar 2004 17:50:26 -0000 1.62 +++ if_ar.c 28 May 2004 14:37:35 -0000 @@ -227,18 +227,15 @@ static ng_disconnect_t ngar_disconnect; static struct ng_type typestruct = { - NG_ABI_VERSION, - NG_AR_NODE_TYPE, - NULL, - ngar_constructor, - ngar_rcvmsg, - ngar_shutdown, - ngar_newhook, - NULL, - ngar_connect, - ngar_rcvdata, - ngar_disconnect, - NULL + .version = NG_ABI_VERSION, + .name = NG_AR_NODE_TYPE, + .constructor = ngar_constructor, + .rcvmsg = ngar_rcvmsg, + .shutdown = ngar_shutdown, + .newhook = ngar_newhook, + .connect = ngar_connect, + .rcvdata = ngar_rcvdata, + .disconnect = ngar_disconnect, }; static int ngar_done_init = 0; --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="musycc.c.diff" Index: musycc.c =================================================================== RCS file: /home/ncvs/src/sys/dev/musycc/musycc.c,v retrieving revision 1.31 diff -u -r1.31 musycc.c --- musycc.c 17 Mar 2004 17:50:37 -0000 1.31 +++ musycc.c 28 May 2004 14:40:27 -0000 @@ -274,18 +274,15 @@ static ng_disconnect_t musycc_disconnect; static struct ng_type ngtypestruct = { - NG_ABI_VERSION, - NG_NODETYPE, - NULL, - musycc_constructor, - musycc_rcvmsg, - musycc_shutdown, - musycc_newhook, - NULL, - musycc_connect, - musycc_rcvdata, - musycc_disconnect, - NULL + .version = NG_ABI_VERSION, + .name = NG_NODETYPE, + .constructor = musycc_constructor, + .rcvmsg = musycc_rcvmsg, + .shutdown = musycc_shutdown, + .newhook = musycc_newhook, + .connect = musycc_connect, + .rcvdata = musycc_rcvdata, + .disconnect = musycc_disconnect, }; /* --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="if_sr.c.diff" Index: if_sr.c =================================================================== RCS file: /home/ncvs/src/sys/dev/sr/if_sr.c,v retrieving revision 1.59 diff -u -r1.59 if_sr.c --- if_sr.c 17 Mar 2004 17:50:44 -0000 1.59 +++ if_sr.c 28 May 2004 14:43:05 -0000 @@ -273,18 +273,15 @@ static ng_disconnect_t ngsr_disconnect; static struct ng_type typestruct = { - NG_ABI_VERSION, - NG_SR_NODE_TYPE, - NULL, - ngsr_constructor, - ngsr_rcvmsg, - ngsr_shutdown, - ngsr_newhook, - NULL, - ngsr_connect, - ngsr_rcvdata, - ngsr_disconnect, - NULL + .version = NG_ABI_VERSION, + .name = NG_SR_NODE_TYPE, + .constructor = ngsr_constructor, + .rcvmsg = ngsr_rcvmsg, + .shutdown = ngsr_shutdown, + .newhook = ngsr_newhook, + .connect = ngsr_connect, + .rcvdata = ngsr_rcvdata, + .disconnect = ngsr_disconnect, }; static int ngsr_done_init = 0; --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="udbp.c.diff" Index: udbp.c =================================================================== RCS file: /home/ncvs/src/sys/dev/usb/udbp.c,v retrieving revision 1.24 diff -u -r1.24 udbp.c --- udbp.c 24 Aug 2003 17:55:55 -0000 1.24 +++ udbp.c 28 May 2004 14:46:40 -0000 @@ -196,18 +196,16 @@ /* Netgraph node type descriptor */ Static struct ng_type ng_udbp_typestruct = { - NG_ABI_VERSION, - NG_UDBP_NODE_TYPE, - NULL, - ng_udbp_constructor, - ng_udbp_rcvmsg, - ng_udbp_rmnode, - ng_udbp_newhook, - NULL, - ng_udbp_connect, - ng_udbp_rcvdata, - ng_udbp_disconnect, - ng_udbp_cmdlist + .version = NG_ABI_VERSION, + .name = NG_UDBP_NODE_TYPE, + .constructor = ng_udbp_constructor, + .rcvmsg = ng_udbp_rcvmsg, + .shutdown = ng_udbp_rmnode, + .newhook = ng_udbp_newhook, + .connect = ng_udbp_connect, + .rcvdata = ng_udbp_rcvdata, + .disconnect = ng_udbp_disconnect, + .cmdlist = ng_udbp_cmdlist, }; Static int udbp_setup_in_transfer (udbp_p sc); --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="i4b_ing.c.diff" Index: i4b_ing.c =================================================================== RCS file: /home/ncvs/src/sys/i4b/driver/i4b_ing.c,v retrieving revision 1.17 diff -u -r1.17 i4b_ing.c --- i4b_ing.c 10 Jun 2003 23:14:55 -0000 1.17 +++ i4b_ing.c 28 May 2004 14:52:14 -0000 @@ -198,18 +198,16 @@ /* Netgraph node type descriptor */ static struct ng_type typestruct = { - NG_ABI_VERSION, - NG_ING_NODE_TYPE, - NULL, - ng_ing_constructor, - ng_ing_rcvmsg, - ng_ing_shutdown, - ng_ing_newhook, - NULL, - ng_ing_connect, - ng_ing_rcvdata, - ng_ing_disconnect, - ng_ing_cmdlist + .version = NG_ABI_VERSION, + .name = NG_ING_NODE_TYPE, + .constructor = ng_ing_constructor, + .rcvmsg = ng_ing_rcvmsg, + .shutdown = ng_ing_shutdown, + .newhook = ng_ing_newhook, + .connect = ng_ing_connect, + .rcvdata = ng_ing_rcvdata, + .disconnect = ng_ing_disconnect, + .cmdlist = ng_ing_cmdlist, }; NETGRAPH_INIT_ORDERED(ing, &typestruct, SI_SUB_DRIVERS, SI_ORDER_ANY); --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="if_mn.c.diff" Index: if_mn.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_mn.c,v retrieving revision 1.41 diff -u -r1.41 if_mn.c --- if_mn.c 17 Mar 2004 17:50:53 -0000 1.41 +++ if_mn.c 28 May 2004 14:55:35 -0000 @@ -189,18 +189,15 @@ static ng_disconnect_t ngmn_disconnect; static struct ng_type mntypestruct = { - NG_ABI_VERSION, - NG_MN_NODE_TYPE, - NULL, - ngmn_constructor, - ngmn_rcvmsg, - ngmn_shutdown, - ngmn_newhook, - NULL, - ngmn_connect, - ngmn_rcvdata, - ngmn_disconnect, - NULL + .version = NG_ABI_VERSION, + .name = NG_MN_NODE_TYPE, + .constructor = ngmn_constructor, + .rcvmsg = ngmn_rcvmsg, + .shutdown = ngmn_shutdown, + .newhook = ngmn_newhook, + .connect = ngmn_connect, + .rcvdata = ngmn_rcvdata, + .disconnect = ngmn_disconnect, }; static MALLOC_DEFINE(M_MN, "mn", "Mx driver related"); --sm4nu43k4a2Rpi4c--