kern_linker.c (92547) | kern_linker.c (92705) |
---|---|
1/*- 2 * Copyright (c) 1997-2000 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-2000 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 * $FreeBSD: head/sys/kern/kern_linker.c 92547 2002-03-18 07:45:30Z arr $ | 26 * $FreeBSD: head/sys/kern/kern_linker.c 92705 2002-03-19 15:41:21Z arr $ |
27 */ 28 29#include "opt_ddb.h" 30 31#include <sys/param.h> 32#include <sys/kernel.h> 33#include <sys/systm.h> 34#include <sys/malloc.h> --- 978 unchanged lines hidden (view full) --- 1013 return (bestmod); 1014} 1015 1016static modlist_t 1017modlist_newmodule(const char *modname, int version, linker_file_t container) 1018{ 1019 modlist_t mod; 1020 | 27 */ 28 29#include "opt_ddb.h" 30 31#include <sys/param.h> 32#include <sys/kernel.h> 33#include <sys/systm.h> 34#include <sys/malloc.h> --- 978 unchanged lines hidden (view full) --- 1013 return (bestmod); 1014} 1015 1016static modlist_t 1017modlist_newmodule(const char *modname, int version, linker_file_t container) 1018{ 1019 modlist_t mod; 1020 |
1021 mod = malloc(sizeof(struct modlist), M_LINKER, M_NOWAIT); | 1021 mod = malloc(sizeof(struct modlist), M_LINKER, M_NOWAIT | M_ZERO); |
1022 if (mod == NULL) 1023 panic("no memory for module list"); | 1022 if (mod == NULL) 1023 panic("no memory for module list"); |
1024 bzero(mod, sizeof(*mod)); | |
1025 mod->container = container; 1026 mod->name = modname; 1027 mod->version = version; 1028 TAILQ_INSERT_TAIL(&found_modules, mod, link); 1029 return (mod); 1030} 1031 1032/* --- 736 unchanged lines hidden --- | 1024 mod->container = container; 1025 mod->name = modname; 1026 mod->version = version; 1027 TAILQ_INSERT_TAIL(&found_modules, mod, link); 1028 return (mod); 1029} 1030 1031/* --- 736 unchanged lines hidden --- |