Correct some prototypes.

This commit is contained in:
pk 1995-09-17 00:50:54 +00:00
parent 82e5cf06bc
commit a32163f292
4 changed files with 17 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: boot.c,v 1.12 1995/09/16 23:20:25 pk Exp $ */
/* $NetBSD: boot.c,v 1.13 1995/09/17 00:50:54 pk Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1993
@ -58,13 +58,14 @@ char *strtab;
int strtablen;
char fbuf[80], dbuf[128];
typedef void (*entry_t)__P((caddr_t, int, int, int, long, long));
void loadfile __P((int, caddr_t));
main()
{
int io;
char *file;
register void (*entry)__P((caddr_t)) = (void (*)__P((caddr_t)))LOADADDR;
prom_init();
@ -94,9 +95,6 @@ main()
printf("Booting %s @ 0x%x\n", file, LOADADDR);
loadfile(io, LOADADDR);
/* Note: args 2-4 not used due to conflicts with SunOS loaders */
(*entry)(cputyp == CPU_SUN4 ? LOADADDR : (caddr_t)promvec,
0, 0, 0, esym, DDB_MAGIC);
_rtt();
}
@ -105,6 +103,7 @@ loadfile(io, addr)
register int io;
register caddr_t addr;
{
register entry_t entry = (entry_t)LOADADDR;
struct exec x;
int i;
@ -116,7 +115,7 @@ loadfile(io, addr)
}
printf("%d", x.a_text);
if (N_GETMAGIC(x) == ZMAGIC) {
entry = (void (*)())(addr+sizeof(struct exec));
entry = (entry_t)(addr+sizeof(struct exec));
addr += sizeof(struct exec);
}
if (read(io, (char *)addr, x.a_text) != x.a_text)
@ -165,6 +164,10 @@ loadfile(io, addr)
}
printf("=0x%x\n", addr);
close(io);
/* Note: args 2-4 not used due to conflicts with SunOS loaders */
(*entry)(cputyp == CPU_SUN4 ? LOADADDR : (caddr_t)promvec,
0, 0, 0, esym, DDB_MAGIC);
return;
shread:

View File

@ -1,4 +1,4 @@
/* $NetBSD: dvma.c,v 1.1 1995/09/16 23:20:29 pk Exp $ */
/* $NetBSD: dvma.c,v 1.2 1995/09/17 00:50:56 pk Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
* All rights reserved.
@ -40,7 +40,7 @@
#include <sys/param.h>
#include <machine/pte.h>
#include <machine/ctlreg.h>
#include "sparc.h"
#include "promdev.h"
#define DVMA_BASE 0xFFF00000
#define DVMA_MAPLEN 0xE0000 /* 1 MB - 128K (save MONSHORTSEG) */

View File

@ -1,4 +1,4 @@
/* $NetBSD: promdev.c,v 1.11 1995/09/16 23:20:35 pk Exp $ */
/* $NetBSD: promdev.c,v 1.12 1995/09/17 00:50:58 pk Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@ -302,9 +302,9 @@ obp_close(f)
net_close(pd);
#endif
if (promvec->pv_romvec_vers >= 2)
(void)(*promvec->pv_v2devops.v2_open)(fd);
(void)(*promvec->pv_v2devops.v2_close)(fd);
else
(void)(*promvec->pv_v0devops.v0_open)(fd);
(void)(*promvec->pv_v0devops.v0_close)(fd);
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: promdev.h,v 1.1 1995/09/16 23:20:36 pk Exp $ */
/* $NetBSD: promdev.h,v 1.2 1995/09/17 00:51:00 pk Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@ -56,8 +56,8 @@ extern int cputyp, nbpg, pgofset, pgshift;
extern int debug;
/* Note: dvma_*() routines are for "oldmon" machines only */
extern char *dvma_mapin __P((char *, int));
extern void dvma_mapout __P((char *, int));
extern char *dvma_mapin __P((char *, size_t));
extern char *dvma_mapout __P((char *, size_t));
extern char *dvma_alloc __P((int));
/*