-make ustarfs optional (enabled per default) for cases where space is

scarce
-make the boot timeout patchable
-optionally, call checkpasswd() before the boot menu can be accessed
(The latter 2 follow PR port-i386/8196 by  Stephan Thesing.)
This commit is contained in:
drochner 1999-09-10 16:38:46 +00:00
parent 5c48b9a115
commit 4486b15211
3 changed files with 18 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.23 1999/07/11 01:22:45 kim Exp $
# $NetBSD: Makefile,v 1.24 1999/09/10 16:38:46 drochner Exp $
S= ${.CURDIR}/../../../../
@ -28,7 +28,10 @@ CPPFLAGS+= -DCOMPAT_OLDBOOT -DCOMPAT_386BSD_MBRPART
CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
.endif
CPPFLAGS+= -DSUPPORT_USTARFS
CPPFLAGS+= -DPASS_BIOSGEOM
#CPPFLAGS+= -DBOOTPASSWD
#uncomment if there are problems with memory detection
#CPPFLAGS+= -DCONSERVATIVE_MEMDETECT
#increase MAXFLENTRIES if "installboot" complains about

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.c,v 1.3 1998/12/19 19:44:56 he Exp $ */
/* $NetBSD: conf.c,v 1.4 1999/09/10 16:38:47 drochner Exp $ */
/*
* Copyright (c) 1997
@ -36,7 +36,9 @@
#include <lib/libsa/stand.h>
#include <lib/libsa/ufs.h>
#ifdef SUPPORT_USTARFS
#include <lib/libsa/ustarfs.h>
#endif
#include <biosdisk.h>
@ -46,8 +48,10 @@ struct devsw devsw[] = {
int ndevs = sizeof(devsw) / sizeof(struct devsw);
struct fs_ops file_system[] = {
#ifdef SUPPORT_USTARFS
{ ustarfs_open, ustarfs_close, ustarfs_read, ustarfs_write,
ustarfs_seek, ustarfs_stat },
#endif
{ ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, ufs_stat },
};
int nfsys = sizeof(file_system) / sizeof(struct fs_ops);

View File

@ -1,7 +1,7 @@
/* $NetBSD: main.c,v 1.16 1999/04/14 11:45:39 drochner Exp $ */
/* $NetBSD: main.c,v 1.17 1999/09/10 16:38:47 drochner Exp $ */
/*
* Copyright (c) 1996, 1997
* Copyright (c) 1996, 1997, 1999
* Matthias Drochner. All rights reserved.
* Copyright (c) 1996, 1997
* Perry E. Metzger. All rights reserved.
@ -68,6 +68,7 @@ char *names[] = {
#define MAXDEVNAME 16
#define TIMEOUT 5
int boottimeout = TIMEOUT; /* patchable */
static char *default_devname;
static int default_unit, default_partition;
@ -249,8 +250,12 @@ main()
printf("booting %s - starting in ",
sprint_bootsel(names[currname]));
c = awaitkey(TIMEOUT, 1);
if ((c != '\r') && (c != '\n') && (c != '\0')) {
c = awaitkey(boottimeout, 1);
if ((c != '\r') && (c != '\n') && (c != '\0')
#ifdef BOOTPASSWD
&& checkpasswd()
#endif
) {
printf("type \"?\" or \"help\" for help.\n");
bootmenu(); /* does not return */
}