diff options
author | kato <kato@FreeBSD.org> | 1998-02-10 08:03:42 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1998-02-10 08:03:42 +0000 |
commit | c1a8f97c8ee61b4937eb7c54e96443b1454bf888 (patch) | |
tree | fa4d566be38f0f12e278c67c6bf850ba75e562b9 | |
parent | 0960b03c1e26765d997a7145f89307f9b6aa6ad2 (diff) | |
download | FreeBSD-src-c1a8f97c8ee61b4937eb7c54e96443b1454bf888.zip FreeBSD-src-c1a8f97c8ee61b4937eb7c54e96443b1454bf888.tar.gz |
Sync with sys/i386/i386/userconfig.c revision 1.102.
-rw-r--r-- | sys/pc98/i386/userconfig.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/pc98/i386/userconfig.c b/sys/pc98/i386/userconfig.c index a2bb7f0..bc770c5 100644 --- a/sys/pc98/i386/userconfig.c +++ b/sys/pc98/i386/userconfig.c @@ -46,7 +46,7 @@ ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** - ** $Id: userconfig.c,v 1.44 1998/01/22 14:26:34 kato Exp $ + ** $Id: userconfig.c,v 1.45 1998/01/26 09:18:18 kato Exp $ **/ /** @@ -116,6 +116,7 @@ #include <sys/systm.h> #include <sys/kernel.h> #include <sys/malloc.h> +#include <sys/reboot.h> #include <machine/cons.h> #include <machine/md_var.h> @@ -136,6 +137,7 @@ static struct isa_device *isa_devlist; /* list read by dset to extract changes * #ifdef USERCONFIG_BOOT char userconfig_from_boot[512] = ""; +static int userconfig_boot_parsing; /* set if we are reading from the boot instructions */ static int getchar(void) @@ -151,8 +153,10 @@ getchar(void) } } if (*next) { + userconfig_boot_parsing = 1; return (*next++); } else { + userconfig_boot_parsing = 0; return cngetc(); } } @@ -2387,7 +2391,7 @@ visuserconfig(void) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: userconfig.c,v 1.44 1998/01/22 14:26:34 kato Exp $ + * $Id: userconfig.c,v 1.45 1998/01/26 09:18:18 kato Exp $ */ #include "scbus.h" @@ -2854,6 +2858,15 @@ set_num_eisa_slots(CmdParm *parms) static int quitfunc(CmdParm *parms) { +#ifdef USERCONFIG_BOOT + /* + * If kernel config supplied, and we are parsing it, and -c also supplied, + * ignore a quit command, This provides a safety mechanism to allow + * recovery from a damaged/buggy kernel config. + */ + if ((boothowto & RB_CONFIG) && userconfig_boot_parsing) + return 0; +#endif return 1; } |