Deleted Added
full compact
kern_environment.c (62454) kern_environment.c (62573)
1/*-
2 * Copyright (c) 1998 Michael Smith
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) 1998 Michael Smith
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_environment.c 62454 2000-07-03 09:35:31Z phk $
26 * $FreeBSD: head/sys/kern/kern_environment.c 62573 2000-07-04 11:25:35Z phk $
27 */
28
29/*
30 * The unified bootloader passes us a pointer to a preserved copy of
31 * bootstrap/kernel environment variables.
32 * We make these available using sysctl for both in-kernel and
33 * out-of-kernel consumers.
34 *

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

97 if ((vtp == value) || (*vtp != '\0'))
98 return(0);
99
100 *data = iv;
101 return(1);
102}
103
104static int
27 */
28
29/*
30 * The unified bootloader passes us a pointer to a preserved copy of
31 * bootstrap/kernel environment variables.
32 * We make these available using sysctl for both in-kernel and
33 * out-of-kernel consumers.
34 *

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

97 if ((vtp == value) || (*vtp != '\0'))
98 return(0);
99
100 *data = iv;
101 return(1);
102}
103
104static int
105sysctl_kernenv (SYSCTL_HANDLER_ARGS)
105sysctl_kernenv(SYSCTL_HANDLER_ARGS)
106{
107 int *name = (int *)arg1;
108 u_int namelen = arg2;
109 char *cp;
110 int i, error;
111
112 if (kern_envp == NULL)
113 return(ENOENT);

--- 40 unchanged lines hidden ---
106{
107 int *name = (int *)arg1;
108 u_int namelen = arg2;
109 char *cp;
110 int i, error;
111
112 if (kern_envp == NULL)
113 return(ENOENT);

--- 40 unchanged lines hidden ---