Use get_bootconf_option() to find boot options, rather than home-grown
strstr()-based hacks.
This commit is contained in:
parent
0ea71ec5ea
commit
e2b24925d1
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.c,v 1.1 2001/04/20 18:08:48 matt Exp $ */
|
||||
/* $NetBSD: cpu.c,v 1.2 2001/05/13 13:53:08 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Mark Brinicombe.
|
||||
|
@ -230,10 +230,11 @@ identify_master_cpu(dv, cpu_number)
|
|||
|
||||
#ifdef ARMFPE
|
||||
if (boot_args) {
|
||||
char *ptr;
|
||||
int usearmfpe = 1;
|
||||
|
||||
ptr = strstr(boot_args, "noarmfpe");
|
||||
if (!ptr) {
|
||||
get_bootconf_option(boot_args, "armfpe",
|
||||
BOOTOPT_TYPE_BOOLEAN, &usearmfpe);
|
||||
if (usearmfpe) {
|
||||
if (initialise_arm_fpe(&cpus[cpu_number]) != 0)
|
||||
identify_arm_fpu(dv, cpu_number);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.36 2000/06/06 20:17:34 matt Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.37 2001/05/13 13:53:08 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
|
@ -137,13 +137,9 @@ set_root_device()
|
|||
|
||||
if (boot_file)
|
||||
get_device(boot_file);
|
||||
if (boot_args) {
|
||||
ptr = strstr(boot_args, "root=");
|
||||
if (ptr) {
|
||||
ptr += 5;
|
||||
get_device(ptr);
|
||||
}
|
||||
}
|
||||
if (boot_args &&
|
||||
get_bootconf_option(boot_args, "root", BOOTOPT_TYPE_STRING, &ptr))
|
||||
get_device(ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: asc.c,v 1.32 2001/04/25 17:53:10 bouyer Exp $ */
|
||||
/* $NetBSD: asc.c,v 1.33 2001/05/13 13:53:08 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Mark Brinicombe
|
||||
|
@ -184,13 +184,9 @@ ascattach(pdp, dp, auxp)
|
|||
printf(": hostid=%d", sbic->sc_channel.chan_id);
|
||||
|
||||
#if ASC_POLL > 0
|
||||
if (boot_args) {
|
||||
char *ptr;
|
||||
|
||||
ptr = strstr(boot_args, "ascpoll");
|
||||
if (ptr)
|
||||
asc_poll = 1;
|
||||
}
|
||||
if (boot_args)
|
||||
get_bootconf_option(boot_args, "ascpoll", BOOTOPT_TYPE_BOOLEAN,
|
||||
&asc_poll);
|
||||
|
||||
if (asc_poll)
|
||||
printf(" polling");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cosc.c,v 1.16 2001/04/25 17:53:11 bouyer Exp $ */
|
||||
/* $NetBSD: cosc.c,v 1.17 2001/05/13 13:53:08 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Mark Brinicombe
|
||||
|
@ -228,13 +228,9 @@ coscattach(pdp, dp, auxp)
|
|||
printf(" hostid=%d", sc->sc_softc.sc_host_id);
|
||||
|
||||
#if COSC_POLL > 0
|
||||
if (boot_args) {
|
||||
char *ptr;
|
||||
|
||||
ptr = strstr(boot_args, "nocoscpoll");
|
||||
if (ptr)
|
||||
cosc_poll = 0;
|
||||
}
|
||||
if (boot_args)
|
||||
get_bootconf_option(boot_args, "coscpoll",
|
||||
BOOTOPT_TYPE_BOOLEAN, &cosc_poll);
|
||||
|
||||
if (cosc_poll)
|
||||
printf(" polling");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.1 2001/02/23 03:48:08 ichiro Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.2 2001/05/13 13:53:09 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
|
@ -115,13 +115,9 @@ set_root_device()
|
|||
|
||||
if (boot_file)
|
||||
get_device(boot_file);
|
||||
if (boot_args) {
|
||||
ptr = strstr(boot_args, "root=");
|
||||
if (ptr) {
|
||||
ptr += 5;
|
||||
get_device(ptr);
|
||||
}
|
||||
}
|
||||
if (boot_args &&
|
||||
get_bootconf_option(boot_args, "root", BOOTOPT_TYPE_STRING, &ptr))
|
||||
get_device(ptr);
|
||||
}
|
||||
#endif /* ifndef MEMORY_DISK_IS_ROOT */
|
||||
|
||||
|
|
Loading…
Reference in New Issue