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 add prototypes, use ufs_ls() fr...



details:   https://anonhg.NetBSD.org/src/rev/e0fa940d7490
branches:  trunk
changeset: 471891:e0fa940d7490
user:      drochner <drochner%NetBSD.org@localhost>
date:      Wed Apr 14 11:45:39 1999 +0000

description:
add prototypes, use ufs_ls() from mi libsa, revert to "void main()",
compile with -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main

diffstat:

 sys/arch/i386/stand/biosboot/Makefile  |   8 ++------
 sys/arch/i386/stand/biosboot/devopen.c |   5 ++++-
 sys/arch/i386/stand/biosboot/devopen.h |   3 +++
 sys/arch/i386/stand/biosboot/main.c    |  25 ++++++++++++++-----------
 4 files changed, 23 insertions(+), 18 deletions(-)

diffs (139 lines):

diff -r 9117cc3d9081 -r e0fa940d7490 sys/arch/i386/stand/biosboot/Makefile
--- a/sys/arch/i386/stand/biosboot/Makefile     Wed Apr 14 11:32:50 1999 +0000
+++ b/sys/arch/i386/stand/biosboot/Makefile     Wed Apr 14 11:45:39 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.19 1999/03/14 00:04:22 fvdl Exp $
+#      $NetBSD: Makefile,v 1.20 1999/04/14 11:45:40 drochner Exp $
 
 S=     ${.CURDIR}/../../../../
 
@@ -30,11 +30,7 @@
 #CPPFLAGS+= -DPRIM_LOADSZ=9
 
 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
-CFLAGS+= -Wall
-
-# XXX should go into library
-SRCS+= ls.c
-.PATH: ${.CURDIR}/../libsa
+CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
 
 SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x40000
 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_INCLUDE_NET=no
diff -r 9117cc3d9081 -r e0fa940d7490 sys/arch/i386/stand/biosboot/devopen.c
--- a/sys/arch/i386/stand/biosboot/devopen.c    Wed Apr 14 11:32:50 1999 +0000
+++ b/sys/arch/i386/stand/biosboot/devopen.c    Wed Apr 14 11:45:39 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: devopen.c,v 1.7 1998/05/15 16:38:53 drochner Exp $      */
+/*     $NetBSD: devopen.c,v 1.8 1999/04/14 11:45:39 drochner Exp $      */
 
 /*
  * Copyright (c) 1996, 1997
@@ -42,6 +42,7 @@
 
 #include <libi386.h>
 #include <biosdisk.h>
+#include "devopen.h"
 #ifdef _STANDALONE
 #include <bootinfo.h>
 #endif
@@ -49,6 +50,8 @@
 extern int parsebootfile __P((const char *, char**, char**, unsigned int*,
                              unsigned int*, const char**));
 
+static int dev2bios __P((char *, unsigned int, int *));
+
 static struct {
        char           *name;
        int             biosdev;
diff -r 9117cc3d9081 -r e0fa940d7490 sys/arch/i386/stand/biosboot/devopen.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/i386/stand/biosboot/devopen.h    Wed Apr 14 11:45:39 1999 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: devopen.h,v 1.1 1999/04/14 11:45:39 drochner Exp $ */
+
+int bios2dev __P((int, char **, unsigned int *));
diff -r 9117cc3d9081 -r e0fa940d7490 sys/arch/i386/stand/biosboot/main.c
--- a/sys/arch/i386/stand/biosboot/main.c       Wed Apr 14 11:32:50 1999 +0000
+++ b/sys/arch/i386/stand/biosboot/main.c       Wed Apr 14 11:45:39 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.15 1999/02/12 05:14:22 cjs Exp $    */
+/*     $NetBSD: main.c,v 1.16 1999/04/14 11:45:39 drochner Exp $       */
 
 /*
  * Copyright (c) 1996, 1997
@@ -41,12 +41,11 @@
 #include <sys/reboot.h>
 
 #include <lib/libsa/stand.h>
+#include <lib/libsa/ufs.h>
 #include <lib/libkern/libkern.h>
 
 #include <libi386.h>
-
-extern void ls __P((char*));
-extern int bios2dev __P((int, char**, int*));
+#include "devopen.h"
 
 int errno;
 extern int boot_biosdev;
@@ -74,6 +73,11 @@
 static int default_unit, default_partition;
 static char *default_filename;
 
+char *sprint_bootsel __P((const char *));
+void bootit __P((const char *, int, int));
+void print_banner __P((void));
+void main __P((void));
+
 void   command_help __P((char *));
 void   command_ls __P((char *));
 void   command_quit __P((char *));
@@ -161,8 +165,9 @@
        return(0);
 }
 
-char *sprint_bootsel(filename)
-const char *filename;
+char *
+sprint_bootsel(filename)
+       const char *filename;
 {
        char *fsname, *devname;
        int unit, partition;
@@ -198,7 +203,7 @@
 }
 
 void
-print_banner(void)
+print_banner()
 {
 
        printf("\n");
@@ -217,7 +222,7 @@
  * note: normally, void main() wouldn't be legal, but this isn't a
  * hosted environment...
  */
-int
+void
 main()
 {
        int currname;
@@ -265,8 +270,6 @@
                /* since it failed, try switching bootfile. */
                currname = ++currname % NUMNAMES;
        }
-
-       return (0);
 }
 
 /* ARGSUSED */
@@ -291,7 +294,7 @@
        char *save = default_filename;
 
        default_filename = "/";
-       ls(arg);
+       ufs_ls(arg);
        default_filename = save;
 }
 



Home | Main Index | Thread Index | Old Index