Deleted Added
full compact
init_main.c (93818) init_main.c (94936)
1/*
2 * Copyright (c) 1995 Terrence R. Lambert
3 * All rights reserved.
4 *
5 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
6 * The Regents of the University of California. All rights reserved.
7 * (c) UNIX System Laboratories, Inc.
8 * All or some portions of this file are derived from material licensed

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

34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * @(#)init_main.c 8.9 (Berkeley) 1/21/94
1/*
2 * Copyright (c) 1995 Terrence R. Lambert
3 * All rights reserved.
4 *
5 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
6 * The Regents of the University of California. All rights reserved.
7 * (c) UNIX System Laboratories, Inc.
8 * All or some portions of this file are derived from material licensed

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

34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 *
41 * @(#)init_main.c 8.9 (Berkeley) 1/21/94
42 * $FreeBSD: head/sys/kern/init_main.c 93818 2002-04-04 21:03:38Z jhb $
42 * $FreeBSD: head/sys/kern/init_main.c 94936 2002-04-17 13:06:36Z mux $
43 */
44
45#include "opt_init_path.h"
46
47#include <sys/param.h>
48#include <sys/kernel.h>
49#include <sys/file.h>
50#include <sys/filedesc.h>

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

523 FALSE, VM_PROT_ALL, VM_PROT_ALL, 0) != 0)
524 panic("init: couldn't allocate argument space");
525 p->p_vmspace->vm_maxsaddr = (caddr_t)addr;
526 p->p_vmspace->vm_ssize = 1;
527
528 if ((var = getenv("init_path")) != NULL) {
529 strncpy(init_path, var, sizeof init_path);
530 init_path[sizeof init_path - 1] = 0;
43 */
44
45#include "opt_init_path.h"
46
47#include <sys/param.h>
48#include <sys/kernel.h>
49#include <sys/file.h>
50#include <sys/filedesc.h>

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

523 FALSE, VM_PROT_ALL, VM_PROT_ALL, 0) != 0)
524 panic("init: couldn't allocate argument space");
525 p->p_vmspace->vm_maxsaddr = (caddr_t)addr;
526 p->p_vmspace->vm_ssize = 1;
527
528 if ((var = getenv("init_path")) != NULL) {
529 strncpy(init_path, var, sizeof init_path);
530 init_path[sizeof init_path - 1] = 0;
531 freeenv(var);
531 }
532 }
532 if ((var = getenv("kern.fallback_elf_brand")) != NULL)
533 if ((var = getenv("kern.fallback_elf_brand")) != NULL) {
533 fallback_elf_brand = strtol(var, NULL, 0);
534 fallback_elf_brand = strtol(var, NULL, 0);
535 freeenv(var);
536 }
534
535 for (path = init_path; *path != '\0'; path = next) {
536 while (*path == ':')
537 path++;
538 if (*path == '\0')
539 break;
540 for (next = path; *next != '\0' && *next != ':'; next++)
541 /* nothing */ ;

--- 117 unchanged lines hidden ---
537
538 for (path = init_path; *path != '\0'; path = next) {
539 while (*path == ':')
540 path++;
541 if (*path == '\0')
542 break;
543 for (next = path; *next != '\0' && *next != ':'; next++)
544 /* nothing */ ;

--- 117 unchanged lines hidden ---