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



details:   https://anonhg.NetBSD.org/src/rev/8844ea189e3a
branches:  trunk
changeset: 471892:8844ea189e3a
user:      drochner <drochner%NetBSD.org@localhost>
date:      Wed Apr 14 11:53:43 1999 +0000

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

diffstat:

 sys/arch/i386/stand/dosboot/Makefile  |   6 +++---
 sys/arch/i386/stand/dosboot/devopen.c |   4 +++-
 sys/arch/i386/stand/dosboot/main.c    |  27 +++++++++++++++++----------
 3 files changed, 23 insertions(+), 14 deletions(-)

diffs (128 lines):

diff -r e0fa940d7490 -r 8844ea189e3a sys/arch/i386/stand/dosboot/Makefile
--- a/sys/arch/i386/stand/dosboot/Makefile      Wed Apr 14 11:45:39 1999 +0000
+++ b/sys/arch/i386/stand/dosboot/Makefile      Wed Apr 14 11:53:43 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.12 1999/04/08 10:23:23 drochner Exp $
+#      $NetBSD: Makefile,v 1.13 1999/04/14 11:53:44 drochner Exp $
 
 S=     ${.CURDIR}/../../../../
 
@@ -16,10 +16,10 @@
 #CPPFLAGS+= -DCONSERVATIVE_MEMDETECT
 
 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
-CFLAGS+= -Wall
+CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
 
 # XXX should go into library
-SRCS+= getopt.c ls.c
+SRCS+= getopt.c
 .PATH: ${.CURDIR}/../libsa
 
 SAMISCCPPFLAGS+= -DHEAP_START=0x10000 -DHEAP_LIMIT=0x40000
diff -r e0fa940d7490 -r 8844ea189e3a sys/arch/i386/stand/dosboot/devopen.c
--- a/sys/arch/i386/stand/dosboot/devopen.c     Wed Apr 14 11:45:39 1999 +0000
+++ b/sys/arch/i386/stand/dosboot/devopen.c     Wed Apr 14 11:53:43 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: devopen.c,v 1.3 1997/09/17 18:40:33 drochner Exp $      */
+/*     $NetBSD: devopen.c,v 1.4 1999/04/14 11:53:44 drochner Exp $      */
 
 /*
  * Copyright (c) 1996
@@ -80,6 +80,8 @@
 };
 #define NUMBIOSDEVS (sizeof(biosdevtab) / sizeof(biosdevtab[0]))
 
+static int dev2bios __P((char *, unsigned int, int *));
+
 static int
 dev2bios(devname, unit, biosdev)
        char           *devname;
diff -r e0fa940d7490 -r 8844ea189e3a sys/arch/i386/stand/dosboot/main.c
--- a/sys/arch/i386/stand/dosboot/main.c        Wed Apr 14 11:45:39 1999 +0000
+++ b/sys/arch/i386/stand/dosboot/main.c        Wed Apr 14 11:53:43 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.11 1999/02/12 05:14:23 cjs Exp $     */
+/*     $NetBSD: main.c,v 1.12 1999/04/14 11:53:43 drochner Exp $        */
 
 /*
  * Copyright (c) 1996, 1997
@@ -40,17 +40,17 @@
 
 #include <lib/libkern/libkern.h>
 #include <lib/libsa/stand.h>
+#include <lib/libsa/ufs.h>
 
 #include <libi386.h>
 
-extern void ls  __P((char *));
 extern int getopt __P((int, char **, const char *));
 
 #ifdef SUPPORT_LYNX
 extern int exec_lynx __P((const char*, int));
 #endif
 
-int             errno;
+int errno;
 
 extern char bootprog_name[], bootprog_rev[], bootprog_date[],
        bootprog_maker[];
@@ -62,6 +62,11 @@
 static int      default_unit, default_partition;
 static char    *default_filename;
 
+char *sprint_bootsel __P((const char *));
+static void bootit __P((const char *, int, int));
+void usage __P((void));
+int main __P((int, char **));
+
 void   command_help __P((char *));
 void   command_ls __P((char *));
 void   command_quit __P((char *));
@@ -151,8 +156,9 @@
        return (0);
 }
 
-char *sprint_bootsel(filename)
-const char *filename;
+char *
+sprint_bootsel(filename)
+       const char *filename;
 {
        char *fsname, *devname;
        int unit, partition;
@@ -164,12 +170,13 @@
                if (!strcmp(fsname, "dos"))
                        sprintf(buf, "dos:%s", file);
                else if (!strcmp(fsname, "ufs"))
-                       sprintf(buf, "%s%d%c:%s", devname, unit, 'a' + partition, file);
+                       sprintf(buf, "%s%d%c:%s", devname, unit,
+                               'a' + partition, file);
                else goto bad;
-               return(buf);
+               return (buf);
        }
 bad:
-       return("(invalid)");
+       return ("(invalid)");
 }
 
 static void
@@ -324,7 +331,7 @@
                return;
        }
        default_filename = "/";
-       ls(arg);
+       ufs_ls(arg);
        default_filename = help;
 }
 
@@ -334,7 +341,7 @@
        char *arg;
 {
        printf("Exiting... goodbye...\n");
-       exit();
+       exit(0);
 }
 
 void



Home | Main Index | Thread Index | Old Index