Deleted Added
full compact
kern_linker.c (99553) kern_linker.c (100488)
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 99553 2002-07-07 22:35:47Z jeff $
26 * $FreeBSD: head/sys/kern/kern_linker.c 100488 2002-07-22 08:28:09Z truckman $
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>

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

1789 * in the kernel.
1790 */
1791static int
1792sysctl_kern_function_list(SYSCTL_HANDLER_ARGS)
1793{
1794 linker_file_t lf;
1795 int error;
1796
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>

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

1789 * in the kernel.
1790 */
1791static int
1792sysctl_kern_function_list(SYSCTL_HANDLER_ARGS)
1793{
1794 linker_file_t lf;
1795 int error;
1796
1797 sysctl_wire_old_buffer(req, 0);
1797 mtx_lock(&kld_mtx);
1798 TAILQ_FOREACH(lf, &linker_files, link) {
1799 error = LINKER_EACH_FUNCTION_NAME(lf,
1800 sysctl_kern_function_list_iterate, req);
1801 if (error) {
1802 mtx_unlock(&kld_mtx);
1803 return (error);
1804 }
1805 }
1806 mtx_unlock(&kld_mtx);
1807 return (SYSCTL_OUT(req, "", 1));
1808}
1809
1810SYSCTL_PROC(_kern, OID_AUTO, function_list, CTLFLAG_RD,
1811 NULL, 0, sysctl_kern_function_list, "", "kernel function list");
1798 mtx_lock(&kld_mtx);
1799 TAILQ_FOREACH(lf, &linker_files, link) {
1800 error = LINKER_EACH_FUNCTION_NAME(lf,
1801 sysctl_kern_function_list_iterate, req);
1802 if (error) {
1803 mtx_unlock(&kld_mtx);
1804 return (error);
1805 }
1806 }
1807 mtx_unlock(&kld_mtx);
1808 return (SYSCTL_OUT(req, "", 1));
1809}
1810
1811SYSCTL_PROC(_kern, OID_AUTO, function_list, CTLFLAG_RD,
1812 NULL, 0, sysctl_kern_function_list, "", "kernel function list");