summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-08-14 17:13:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-08-14 17:13:58 +0000
commit13b4661603127fae5041e6e6310dd95400dfc134 (patch)
treeb6edba04ce39339560fc038b4987a25632c2878d /sys/arch/sparc
parentaaafb0d8ff6924de40a673e0174f9f030cafd15f (diff)
partial proto repairs
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/stand/boot/boot.c5
-rw-r--r--sys/arch/sparc/stand/boot/loadfile.c5
-rw-r--r--sys/arch/sparc/stand/bootxx/bootxx.c4
-rw-r--r--sys/arch/sparc/stand/bootxx/closeall.c4
-rw-r--r--sys/arch/sparc/stand/common/dvma.c4
-rw-r--r--sys/arch/sparc/stand/common/net.c12
-rw-r--r--sys/arch/sparc/stand/common/promdev.c45
-rw-r--r--sys/arch/sparc/stand/common/promdev.h4
8 files changed, 45 insertions, 38 deletions
diff --git a/sys/arch/sparc/stand/boot/boot.c b/sys/arch/sparc/stand/boot/boot.c
index c760ecd42cb..078ae4a9e35 100644
--- a/sys/arch/sparc/stand/boot/boot.c
+++ b/sys/arch/sparc/stand/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.5 2003/06/02 23:27:55 millert Exp $ */
+/* $OpenBSD: boot.c,v 1.6 2003/08/14 17:13:57 deraadt Exp $ */
/* $NetBSD: boot.c,v 1.2 1997/09/14 19:27:21 pk Exp $ */
/*-
@@ -56,8 +56,7 @@ char fbuf[80], dbuf[128];
typedef void (*entry_t)(caddr_t, int, int, int, long, long);
int loadfile(int, vaddr_t *);
-
-main()
+main(int argc, char *argv[])
{
int io;
char *file;
diff --git a/sys/arch/sparc/stand/boot/loadfile.c b/sys/arch/sparc/stand/boot/loadfile.c
index f9532b12707..470512a1bea 100644
--- a/sys/arch/sparc/stand/boot/loadfile.c
+++ b/sys/arch/sparc/stand/boot/loadfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: loadfile.c,v 1.4 2003/06/02 23:27:55 millert Exp $ */
+/* $OpenBSD: loadfile.c,v 1.5 2003/08/14 17:13:57 deraadt Exp $ */
/* $NetBSD: loadfile.c,v 1.3 1997/04/06 08:40:59 cgd Exp $ */
/*
@@ -176,8 +176,7 @@ shread:
* Emulate forward moves with reads, and give up on backwards moves.
* bsd.rd ought to be correctly ordered.
*/
-int elf_seek(int, off_t);
-int
+static int
elf_seek(int fd, off_t relpos)
{
#define DUMBBUFSIZE 4096
diff --git a/sys/arch/sparc/stand/bootxx/bootxx.c b/sys/arch/sparc/stand/bootxx/bootxx.c
index d7bf507c753..6d6e1ef381f 100644
--- a/sys/arch/sparc/stand/bootxx/bootxx.c
+++ b/sys/arch/sparc/stand/bootxx/bootxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bootxx.c,v 1.3 2002/08/11 23:11:22 art Exp $ */
+/* $OpenBSD: bootxx.c,v 1.4 2003/08/14 17:13:57 deraadt Exp $ */
/* $NetBSD: bootxx.c,v 1.2 1997/09/14 19:28:17 pk Exp $ */
/*
@@ -63,7 +63,7 @@ daddr_t block_table[MAXBLOCKNUM] = { 0 };
void loadboot(struct open_file *, caddr_t);
int
-main()
+main(int argc, char *argv[])
{
char *dummy;
size_t n;
diff --git a/sys/arch/sparc/stand/bootxx/closeall.c b/sys/arch/sparc/stand/bootxx/closeall.c
index 1d84dc0be92..47aefa66933 100644
--- a/sys/arch/sparc/stand/bootxx/closeall.c
+++ b/sys/arch/sparc/stand/bootxx/closeall.c
@@ -1,6 +1,6 @@
-/* $OpenBSD: closeall.c,v 1.1 1997/09/17 10:46:16 downsj Exp $ */
+/* $OpenBSD: closeall.c,v 1.2 2003/08/14 17:13:57 deraadt Exp $ */
void
-closeall()
+closeall(void)
{
}
diff --git a/sys/arch/sparc/stand/common/dvma.c b/sys/arch/sparc/stand/common/dvma.c
index 9fa1f58ec20..3540511d218 100644
--- a/sys/arch/sparc/stand/common/dvma.c
+++ b/sys/arch/sparc/stand/common/dvma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dvma.c,v 1.2 2002/03/14 01:26:44 millert Exp $ */
+/* $OpenBSD: dvma.c,v 1.3 2003/08/14 17:13:57 deraadt Exp $ */
/* $NetBSD: dvma.c,v 1.2 1995/09/17 00:50:56 pk Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross
@@ -51,7 +51,7 @@
#define SA_MAX_VA (SA_MIN_VA + DVMA_MAPLEN)
void
-dvma_init()
+dvma_init(void)
{
register int segva, dmava;
diff --git a/sys/arch/sparc/stand/common/net.c b/sys/arch/sparc/stand/common/net.c
index 0c42a5cd596..5b01067ca91 100644
--- a/sys/arch/sparc/stand/common/net.c
+++ b/sys/arch/sparc/stand/common/net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: net.c,v 1.1 1997/09/17 10:46:18 downsj Exp $ */
+/* $OpenBSD: net.c,v 1.2 2003/08/14 17:13:57 deraadt Exp $ */
/* $NetBSD: net.c,v 1.2 1997/07/22 17:41:07 drochner Exp $ */
/*
@@ -60,6 +60,8 @@
#include <lib/libsa/netif.h>
#include <lib/libsa/bootparam.h>
+#include "promdev.h"
+
char rootpath[FNAME_SIZE];
int netdev_sock = -1;
@@ -70,8 +72,7 @@ static int open_count;
* This opens the low-level device and sets f->f_devdata.
*/
int
-net_open(pd)
- struct promdata *pd;
+net_open(struct promdata *pd)
{
int error = 0;
@@ -91,8 +92,7 @@ bad:
}
int
-net_close(pd)
- struct promdata *pd;
+net_close(struct promdata *pd)
{
/* On last close, do netif close, etc. */
if (open_count > 0)
@@ -101,7 +101,7 @@ net_close(pd)
}
int
-net_mountroot()
+net_mountroot(void)
{
#ifdef DEBUG
diff --git a/sys/arch/sparc/stand/common/promdev.c b/sys/arch/sparc/stand/common/promdev.c
index 719c162e818..835e42236f4 100644
--- a/sys/arch/sparc/stand/common/promdev.c
+++ b/sys/arch/sparc/stand/common/promdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: promdev.c,v 1.8 2003/06/01 17:00:39 deraadt Exp $ */
+/* $OpenBSD: promdev.c,v 1.9 2003/08/14 17:13:57 deraadt Exp $ */
/* $NetBSD: promdev.c,v 1.16 1995/11/14 15:04:01 pk Exp $ */
/*
@@ -72,8 +72,17 @@ extern struct filesystem file_system_nfs[];
extern struct filesystem file_system_cd9660[];
extern struct filesystem file_system_ufs[];
-int prom_open(struct open_file *f, ...) { return 0; }
-int prom_ioctl(struct open_file *f, u_long c, void *d) { return EIO; }
+int
+prom_open(struct open_file *f, ...)
+{
+ return 0;
+}
+
+int
+prom_ioctl(struct open_file *f, u_long c, void *d)
+{
+ return EIO;
+}
struct devsw devsw[] = {
{ "prom0", prom0_strategy, prom_open, prom0_close, prom_ioctl },
@@ -236,15 +245,15 @@ obp_strategy(devdata, flag, dblk, size, buf, rsize)
if (pd->devtype == DT_BLOCK)
(*promvec->pv_v2devops.v2_seek)(fd, 0, dbtob(dblk));
- *rsize = (*((flag == F_READ)
- ? (u_int (*)())promvec->pv_v2devops.v2_read
- : (u_int (*)())promvec->pv_v2devops.v2_write
- ))(fd, buf, size);
+ *rsize = (*((flag == F_READ) ?
+ (u_int (*)(int, char *, size_t))promvec->pv_v2devops.v2_read :
+ (u_int (*)(int, char *, size_t))promvec->pv_v2devops.v2_write))
+ (fd, buf, size);
} else {
- int n = (*((flag == F_READ)
- ? (u_int (*)())promvec->pv_v0devops.v0_rbdev
- : (u_int (*)())promvec->pv_v0devops.v0_wbdev
- ))(fd, btodb(size), dblk, buf);
+ int n = (*((flag == F_READ) ?
+ (u_int (*)(int, int, daddr_t, void *))promvec->pv_v0devops.v0_rbdev :
+ (u_int (*)(int, int, daddr_t, void *))promvec->pv_v0devops.v0_wbdev))
+ (fd, btodb(size), dblk, buf);
*rsize = dbtob(n);
}
@@ -434,13 +443,13 @@ getchar()
}
int
-cngetc()
+cngetc(void)
{
return getchar();
}
int
-peekchar()
+peekchar(void)
{
char c;
register int n;
@@ -460,8 +469,7 @@ peekchar()
#endif
static void
-pv_putchar(c)
- int c;
+pv_putchar(int c)
{
char c0 = c;
@@ -492,14 +500,14 @@ _rtt()
int hz = 1000;
time_t
-getsecs()
+getsecs(void)
{
register int ticks = getticks();
return ((time_t)(ticks / hz));
}
int
-getticks()
+getticks(void)
{
if (promvec->pv_romvec_vers >= 2) {
char c;
@@ -512,8 +520,7 @@ getticks()
}
void
-prom_getether(fd, ea)
- u_char *ea;
+prom_getether(int fd, u_char *ea)
{
if (cputyp == CPU_SUN4) {
static struct idprom sun4_idprom;
diff --git a/sys/arch/sparc/stand/common/promdev.h b/sys/arch/sparc/stand/common/promdev.h
index 4c2e1a0705e..2cd93e27cad 100644
--- a/sys/arch/sparc/stand/common/promdev.h
+++ b/sys/arch/sparc/stand/common/promdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: promdev.h,v 1.2 2002/03/14 01:26:44 millert Exp $ */
+/* $OpenBSD: promdev.h,v 1.3 2003/08/14 17:13:57 deraadt Exp $ */
/* $NetBSD: promdev.h,v 1.3 1995/09/18 21:31:50 pk Exp $ */
/*
@@ -61,9 +61,11 @@ extern int debug;
extern void prom_init(void);
/* Note: dvma_*() routines are for "oldmon" machines only */
+extern void dvma_init(void);
extern char *dvma_mapin(char *, size_t);
extern char *dvma_mapout(char *, size_t);
extern char *dvma_alloc(int);
+extern void dvma_free(char *, int);
/*
* duplicates from pmap.c for mapping device on "oldmon" machines.