Deleted Added
full compact
kern_module.c (132167) kern_module.c (132199)
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

--- 11 unchanged lines hidden (view full) ---

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
27#include <sys/cdefs.h>
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

--- 11 unchanged lines hidden (view full) ---

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/kern/kern_module.c 132167 2004-07-14 22:37:36Z phk $");
28__FBSDID("$FreeBSD: head/sys/kern/kern_module.c 132199 2004-07-15 08:26:07Z phk $");
29
30#include <sys/param.h>
31#include <sys/kernel.h>
32#include <sys/systm.h>
33#include <sys/eventhandler.h>
34#include <sys/malloc.h>
35#include <sys/sysproto.h>
36#include <sys/sysent.h>

--- 186 unchanged lines hidden (view full) ---

223}
224
225int
226module_unload(module_t mod, int flags)
227{
228 int error;
229
230 error = MOD_EVENT(mod, MOD_QUIESCE);
29
30#include <sys/param.h>
31#include <sys/kernel.h>
32#include <sys/systm.h>
33#include <sys/eventhandler.h>
34#include <sys/malloc.h>
35#include <sys/sysproto.h>
36#include <sys/sysent.h>

--- 186 unchanged lines hidden (view full) ---

223}
224
225int
226module_unload(module_t mod, int flags)
227{
228 int error;
229
230 error = MOD_EVENT(mod, MOD_QUIESCE);
231 if (error == EOPNOTSUPP)
231 if (error == EOPNOTSUPP || error == EINVAL)
232 error = 0;
233 if (flags == LINKER_UNLOAD_NORMAL && error != 0)
234 return (error);
235 return (MOD_EVENT(mod, MOD_UNLOAD));
236}
237
238int
239module_getid(module_t mod)

--- 170 unchanged lines hidden ---
232 error = 0;
233 if (flags == LINKER_UNLOAD_NORMAL && error != 0)
234 return (error);
235 return (MOD_EVENT(mod, MOD_UNLOAD));
236}
237
238int
239module_getid(module_t mod)

--- 170 unchanged lines hidden ---