Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand/biosboot -make ustarfs optional (enabled...



details:   https://anonhg.NetBSD.org/src/rev/194f99677611
branches:  trunk
changeset: 476252:194f99677611
user:      drochner <drochner%NetBSD.org@localhost>
date:      Fri Sep 10 16:38:46 1999 +0000

description:
-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.)

diffstat:

 sys/arch/i386/stand/biosboot/Makefile |   5 ++++-
 sys/arch/i386/stand/biosboot/conf.c   |   6 +++++-
 sys/arch/i386/stand/biosboot/main.c   |  13 +++++++++----
 3 files changed, 18 insertions(+), 6 deletions(-)

diffs (86 lines):

diff -r 3c150fbb800b -r 194f99677611 sys/arch/i386/stand/biosboot/Makefile
--- a/sys/arch/i386/stand/biosboot/Makefile     Fri Sep 10 16:23:55 1999 +0000
+++ b/sys/arch/i386/stand/biosboot/Makefile     Fri Sep 10 16:38:46 1999 +0000
@@ -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+= -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
diff -r 3c150fbb800b -r 194f99677611 sys/arch/i386/stand/biosboot/conf.c
--- a/sys/arch/i386/stand/biosboot/conf.c       Fri Sep 10 16:23:55 1999 +0000
+++ b/sys/arch/i386/stand/biosboot/conf.c       Fri Sep 10 16:38:46 1999 +0000
@@ -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 @@
 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);
diff -r 3c150fbb800b -r 194f99677611 sys/arch/i386/stand/biosboot/main.c
--- a/sys/arch/i386/stand/biosboot/main.c       Fri Sep 10 16:23:55 1999 +0000
+++ b/sys/arch/i386/stand/biosboot/main.c       Fri Sep 10 16:38:46 1999 +0000
@@ -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 @@
 #define MAXDEVNAME 16
 
 #define TIMEOUT 5
+int boottimeout = TIMEOUT; /* patchable */
 
 static char *default_devname;
 static int default_unit, default_partition;
@@ -249,8 +250,12 @@
                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 */
                }



Home | Main Index | Thread Index | Old Index