kern_module.c (37555) | kern_module.c (37629) |
---|---|
1/*- 2 * Copyright (c) 1997 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1997 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $Id: kern_module.c,v 1.6 1997/11/07 08:52:56 phk Exp $ | 26 * $Id: kern_module.c,v 1.7 1998/07/11 07:45:40 bde Exp $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/kernel.h> 31#include <sys/systm.h> 32#include <sys/malloc.h> 33#include <sys/sysproto.h> 34#include <sys/sysent.h> --- 41 unchanged lines hidden (view full) --- 76} 77 78void 79module_register_init(void *arg) 80{ 81 moduledata_t* data = (moduledata_t*) arg; 82 int error; 83 | 27 */ 28 29#include <sys/param.h> 30#include <sys/kernel.h> 31#include <sys/systm.h> 32#include <sys/malloc.h> 33#include <sys/sysproto.h> 34#include <sys/sysent.h> --- 41 unchanged lines hidden (view full) --- 76} 77 78void 79module_register_init(void *arg) 80{ 81 moduledata_t* data = (moduledata_t*) arg; 82 int error; 83 |
84#define fptrint_t unsigned /* XXX */ | |
85 if (error = module_register(data->name, data->evhand, data->priv)) 86 printf("module_register_init: module_register(%s, %lx, %p) returned %d", | 84 if (error = module_register(data->name, data->evhand, data->priv)) 85 printf("module_register_init: module_register(%s, %lx, %p) returned %d", |
87 data->name, (u_long)(fptrint_t)data->evhand, data->priv, error); | 86 data->name, (u_long)(uintfptr_t)data->evhand, data->priv, error); |
88} 89 90int 91module_register(const char* name, modeventhand_t handler, void* arg) 92{ 93 size_t namelen; 94 module_t newmod; 95 int error; --- 207 unchanged lines hidden --- | 87} 88 89int 90module_register(const char* name, modeventhand_t handler, void* arg) 91{ 92 size_t namelen; 93 module_t newmod; 94 int error; --- 207 unchanged lines hidden --- |