add prototypes, use ufs_ls() from mi libsa, revert to "void main()",
compile with -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
This commit is contained in:
parent
b7c510645f
commit
312eae2bf4
|
@ -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+= -DPASS_BIOSGEOM
|
|||
#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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 *));
|
|
@ -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 char *default_devname;
|
|||
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 @@ parsebootfile(fname, fsname, devname, unit, partition, file)
|
|||
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 @@ bootit(filename, howto, tell)
|
|||
}
|
||||
|
||||
void
|
||||
print_banner(void)
|
||||
print_banner()
|
||||
{
|
||||
|
||||
printf("\n");
|
||||
|
@ -217,7 +222,7 @@ print_banner(void)
|
|||
* note: normally, void main() wouldn't be legal, but this isn't a
|
||||
* hosted environment...
|
||||
*/
|
||||
int
|
||||
void
|
||||
main()
|
||||
{
|
||||
int currname;
|
||||
|
@ -265,8 +270,6 @@ main()
|
|||
/* since it failed, try switching bootfile. */
|
||||
currname = ++currname % NUMNAMES;
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
|
@ -291,7 +294,7 @@ command_ls(arg)
|
|||
char *save = default_filename;
|
||||
|
||||
default_filename = "/";
|
||||
ls(arg);
|
||||
ufs_ls(arg);
|
||||
default_filename = save;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue