Date: Tue, 14 Apr 2009 17:52:05 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 160623 for review Message-ID: <200904141752.n3EHq57U010896@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=160623 Change 160623 by zec@zec_amdx2 on 2009/04/14 17:51:50 Unbreak VIMAGE / VLINT builds. Affected files ... .. //depot/projects/vimage/src/sys/netinet/igmp.c#32 edit .. //depot/projects/vimage/src/sys/netipsec/ipsec.c#44 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet/igmp.c#32 (text+ko) ==== @@ -141,13 +141,10 @@ static int sysctl_igmp_gsr(SYSCTL_HANDLER_ARGS); static int sysctl_igmp_ifinfo(SYSCTL_HANDLER_ARGS); +static vnet_attach_fn vnet_igmp_iattach; #ifdef VIMAGE -static vnet_attach_fn vnet_igmp_iattach; static vnet_detach_fn vnet_igmp_idetach; -#else -static int vnet_igmp_iattach(const void *); -static int vnet_igmp_idetach(const void *); -#endif /* VIMAGE */ +#endif /* * System-wide globals. @@ -3673,6 +3670,7 @@ return (0); } +#ifdef VIMAGE static int vnet_igmp_idetach(const void *unused __unused) { @@ -3685,6 +3683,7 @@ return (0); } +#endif struct vnet_igmp { int dummy; @@ -3700,15 +3699,23 @@ * put the extra fields into vnet_inet instead of a vnet_igmp. * yet it has module setup functions.. */ -#ifdef VIMAGE +#ifndef VIMAGE_GLOBALS static struct vnet_symmap vnet_igmp_symmap[] = { VNET_SYMMAP(inet, igi_head), VNET_SYMMAP(inet, igmpstat), VNET_SYMMAP_END }; -VNET_MOD_DECLARE(IGMP, igmp, vnet_igmp_iattach, vnet_igmp_idetach, - INET, vnet_igmp_symmap); -#endif /* VIMAGE */ +static vnet_modinfo_t vnet_igmp_modinfo = { + .vmi_id = VNET_MOD_IGMP, + .vmi_name = "igmp", + .vmi_dependson = VNET_MOD_INET, + .vmi_symmap = vnet_igmp_symmap, + .vmi_iattach = vnet_igmp_iattach, +#ifdef VIMAGE + .vmi_idetach = vnet_igmp_idetach +#endif +}; +#endif static int igmp_modevent(module_t mod, int type, void *unused __unused) @@ -3717,21 +3724,19 @@ switch (type) { case MOD_LOAD: igmp_sysinit(); -#ifdef VIMAGE +#ifndef VIMAGE_GLOBALS vnet_mod_register(&vnet_igmp_modinfo); #else - (void)vnet_igmp_iattach(NULL); -#endif /* VIMAGE */ + vnet_igmp_iattach(NULL); +#endif break; case MOD_UNLOAD: -#ifdef VIMAGE +#ifndef VIMAGE_GLOBALS /* * TODO: Allow module unload if any VIMAGE instances * are using this module. */ return (EBUSY); -#else - (void)vnet_igmp_idetach(NULL); #endif /* VIMAGE */ igmp_sysuninit(); break; ==== //depot/projects/vimage/src/sys/netipsec/ipsec.c#44 (text+ko) ==== @@ -105,7 +105,7 @@ static int ipsec_iattach(const void *); #ifdef VIMAGE -static int vnet_ipsec_idetach(const void *); +static int ipsec_idetach(const void *); #endif #ifdef VIMAGE_GLOBALS @@ -1774,19 +1774,16 @@ static void ipsec_attach(void) { - INIT_VNET_IPSEC(curvnet); #ifndef VIMAGE_GLOBALS vnet_mod_register(&vnet_ipsec_modinfo); #else ipsec_iattach(NULL); #endif - } static int -ipsec_iattach(unused) - const void *unused; +ipsec_iattach(const void *unused) { INIT_VNET_IPSEC(curvnet); @@ -1796,10 +1793,10 @@ return (0); } -/* XXX finish this! */ +/* XXX revisit this! */ #ifdef VIMAGE static int -vnet_ipsec_idetach(unused) +ipsec_idetach(unused) const void *unused; { return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904141752.n3EHq57U010896>