summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-08-15 23:16:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-08-15 23:16:31 +0000
commit5d56ea0ca32e34ec476c82a335f0150d8304f517 (patch)
tree85ff05ed3d95beda950b6d6e8ca723eedddc79c7 /sys
parent2e1dae6f643c4cae483deb29d3ec63a14b5f8ee0 (diff)
ansi and proto cleanup. one unused function goes away
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/vax/boot/boot/autoconf.c8
-rw-r--r--sys/arch/vax/boot/boot/boot.c4
-rw-r--r--sys/arch/vax/boot/boot/ctu.c21
-rw-r--r--sys/arch/vax/boot/boot/mfm.c28
-rw-r--r--sys/arch/vax/boot/xxboot/bootxx.c59
-rw-r--r--sys/arch/vax/stand/boot/autoconf.c8
-rw-r--r--sys/arch/vax/stand/boot/boot.c4
-rw-r--r--sys/arch/vax/stand/boot/ctu.c21
-rw-r--r--sys/arch/vax/stand/boot/mfm.c28
-rw-r--r--sys/arch/vax/stand/xxboot/bootxx.c59
10 files changed, 58 insertions, 182 deletions
diff --git a/sys/arch/vax/boot/boot/autoconf.c b/sys/arch/vax/boot/boot/autoconf.c
index 00a2db03583..895e154fd31 100644
--- a/sys/arch/vax/boot/boot/autoconf.c
+++ b/sys/arch/vax/boot/boot/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.8 2002/06/11 09:36:23 hugh Exp $ */
+/* $OpenBSD: autoconf.c,v 1.9 2003/08/15 23:16:30 deraadt Exp $ */
/* $NetBSD: autoconf.c,v 1.19 2002/06/01 15:33:22 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
@@ -62,7 +62,7 @@ long *bootregs;
*/
void
-autoconf()
+autoconf(void)
{
int copyrpb = 1;
int fromnet = (bootregs[12] != -1);
@@ -127,7 +127,7 @@ autoconf()
volatile int tickcnt;
int
-getsecs()
+getsecs(void)
{
return tickcnt/100;
}
@@ -152,7 +152,7 @@ mcheck(void *arg)
* to detect unwanted interrupts.
*/
void
-scbinit()
+scbinit(void)
{
int i;
diff --git a/sys/arch/vax/boot/boot/boot.c b/sys/arch/vax/boot/boot/boot.c
index 09496d0631d..4d0986b3f4e 100644
--- a/sys/arch/vax/boot/boot/boot.c
+++ b/sys/arch/vax/boot/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.11 2003/06/02 23:27:57 millert Exp $ */
+/* $OpenBSD: boot.c,v 1.12 2003/08/15 23:16:30 deraadt Exp $ */
/* $NetBSD: boot.c,v 1.18 2002/05/31 15:58:26 ragge Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -283,7 +283,7 @@ load:
void
-loadpcs()
+loadpcs(void)
{
static int pcsdone = 0;
int mid = mfpr(PR_SID);
diff --git a/sys/arch/vax/boot/boot/ctu.c b/sys/arch/vax/boot/boot/ctu.c
index b8a9b863faf..a10824dcf85 100644
--- a/sys/arch/vax/boot/boot/ctu.c
+++ b/sys/arch/vax/boot/boot/ctu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ctu.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */
+/* $OpenBSD: ctu.c,v 1.4 2003/08/15 23:16:30 deraadt Exp $ */
/* $NetBSD: ctu.c,v 1.3 2000/05/20 13:30:03 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -67,9 +67,7 @@ void ctutintr(void);
void cturintr(void);
int
-ctuopen(f, adapt, ctlr, unit, part)
- struct open_file *f;
- int ctlr, unit, part;
+ctuopen(struct open_file *f, int adapt, int ctlr, int unit, int part)
{
tu_sc.sc_state = SC_INIT;
@@ -82,12 +80,7 @@ ctuopen(f, adapt, ctlr, unit, part)
}
int
-ctustrategy(f, func, dblk, size, buf, rsize)
- void *f;
- int func;
- daddr_t dblk;
- void *buf;
- size_t size, *rsize;
+ctustrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize)
{
struct rsp *rsp = (struct rsp *)tu_sc.sc_rsp;
@@ -114,7 +107,7 @@ ctustrategy(f, func, dblk, size, buf, rsize)
}
void
-cturintr()
+cturintr(void)
{
int status;
@@ -154,7 +147,7 @@ cturintr()
}
void
-ctutintr()
+ctutintr(void)
{
int c;
@@ -170,9 +163,7 @@ ctutintr()
}
short
-ctu_cksum(buf, words)
- unsigned short *buf;
- int words;
+ctu_cksum(unsigned short *buf, int words)
{
int i, cksum;
diff --git a/sys/arch/vax/boot/boot/mfm.c b/sys/arch/vax/boot/boot/mfm.c
index 761104bd8c1..b2af22aa847 100644
--- a/sys/arch/vax/boot/boot/mfm.c
+++ b/sys/arch/vax/boot/boot/mfm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfm.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */
+/* $OpenBSD: mfm.c,v 1.4 2003/08/15 23:16:30 deraadt Exp $ */
/* $NetBSD: mfm.c,v 1.4 2001/07/26 22:55:13 wiz Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -99,7 +99,7 @@ static int mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *bu
* instruction. Thus the loop-overhead will be enough...
*/
static void
-sreg_read()
+sreg_read(void)
{
int i;
char *p;
@@ -111,7 +111,7 @@ sreg_read()
}
static void
-creg_write()
+creg_write(void)
{
int i;
char *p;
@@ -131,7 +131,7 @@ creg_write()
* ready...
*/
int
-mfm_rxprepare()
+mfm_rxprepare(void)
{
int error;
@@ -339,8 +339,7 @@ volatile struct mfm_xbn {
} mfm_xbn;
#ifdef verbose
-display_xbn(p)
- struct mfm_xbn *p;
+display_xbn(struct mfm_xbn *p)
{
printf("**DiskData** XBNs: %d, DBNs: %d, LBNs: %d, RBNs: %d\n",
p->xbn_count, p->dbn_count, p->lbn_count, p->rbn_count);
@@ -359,9 +358,7 @@ display_xbn(p)
#endif
int
-mfmopen(f, adapt, ctlr, unit, part)
- struct open_file *f;
- int ctlr, unit, part;
+mfmopen(struct open_file *f, int adapt, int ctlr, int unit, int part)
{
char *msg;
struct disklabel *lp = &mfmlabel;
@@ -455,7 +452,8 @@ mfmopen(f, adapt, ctlr, unit, part)
}
int
-mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) {
+mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize)
+{
struct mfm_softc *msc = f;
struct disklabel *lp;
int block, sect, head, cyl, scount, res;
@@ -540,7 +538,8 @@ mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *
}
int
-mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) {
+mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize)
+{
struct mfm_softc *msc = f;
struct disklabel *lp;
int block, sect, head, cyl, scount, cmd, res;
@@ -631,12 +630,7 @@ mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *
}
int
-mfmstrategy(f, func, dblk, size, buf, rsize)
- void *f;
- int func;
- daddr_t dblk;
- void *buf;
- size_t size, *rsize;
+mfmstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize)
{
struct mfm_softc *msc = f;
int res = -1;
diff --git a/sys/arch/vax/boot/xxboot/bootxx.c b/sys/arch/vax/boot/xxboot/bootxx.c
index 9cdd9abfcf4..5bcf131282b 100644
--- a/sys/arch/vax/boot/xxboot/bootxx.c
+++ b/sys/arch/vax/boot/xxboot/bootxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bootxx.c,v 1.9 2003/06/02 23:27:57 millert Exp $ */
+/* $OpenBSD: bootxx.c,v 1.10 2003/08/15 23:16:30 deraadt Exp $ */
/* $NetBSD: bootxx.c,v 1.16 2002/03/29 05:45:08 matt Exp $ */
/*-
@@ -91,7 +91,7 @@ extern int from;
* VS3100/??, VS4000 and VAX6000/???, and only when booting from disk.
*/
void
-Xmain()
+Xmain(void)
{
union {
struct exec aout;
@@ -216,9 +216,7 @@ struct devsw devsw[] = {
int ndevs = (sizeof(devsw)/sizeof(devsw[0]));
int
-romopen(f, adapt, ctlr, unit, part)
- struct open_file *f;
- int adapt, ctlr, unit, part;
+romopen(struct open_file *f, int adapt, int ctlr, int unit, int part)
{
rom_softc.unit = unit;
rom_softc.part = part;
@@ -230,43 +228,8 @@ romopen(f, adapt, ctlr, unit, part)
#endif
-#if 0
-int tar_open(char *path, struct open_file *f);
-ssize_t tar_read(struct open_file *f, void *buf, size_t size, size_t *resid);
-
-int
-tar_open(path, f)
- char *path;
- struct open_file *f;
-{
- char *buf = alloc(512);
-
- bzero(buf, 512);
- romstrategy(0, 0, 8192, 512, buf, 0);
- if (bcmp(buf, "boot", 5) || bcmp(&buf[257], "ustar", 5))
- return EINVAL; /* Not a ustarfs with "boot" first */
- return 0;
-}
-
-ssize_t
-tar_read(f, buf, size, resid)
- struct open_file *f;
- void *buf;
- size_t size;
- size_t *resid;
-{
- romstrategy(0, 0, (8192+512), size, buf, 0);
- *resid = size;
- return 0; /* XXX */
-}
-#endif
-
-
int
-devopen(f, fname, file)
- struct open_file *f;
- const char *fname;
- char **file;
+devopen(struct open_file *f, const char *fname, char **file)
{
#ifdef LIBSA_TOO_OLD
@@ -409,8 +372,7 @@ extern char end[];
static char *top = (char*)end;
void *
-alloc(size)
- unsigned size;
+alloc(unsigned int size)
{
void *ut = top;
top += size;
@@ -418,19 +380,10 @@ alloc(size)
}
void
-free(ptr, size)
- void *ptr;
- unsigned size;
+free(void *ptr, unsigned int size)
{
}
-int
-romclose(f)
- struct open_file *f;
-{
- return 0;
-}
-
#ifdef USE_PRINTF
void
putchar(int ch)
diff --git a/sys/arch/vax/stand/boot/autoconf.c b/sys/arch/vax/stand/boot/autoconf.c
index 00a2db03583..895e154fd31 100644
--- a/sys/arch/vax/stand/boot/autoconf.c
+++ b/sys/arch/vax/stand/boot/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.8 2002/06/11 09:36:23 hugh Exp $ */
+/* $OpenBSD: autoconf.c,v 1.9 2003/08/15 23:16:30 deraadt Exp $ */
/* $NetBSD: autoconf.c,v 1.19 2002/06/01 15:33:22 ragge Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
@@ -62,7 +62,7 @@ long *bootregs;
*/
void
-autoconf()
+autoconf(void)
{
int copyrpb = 1;
int fromnet = (bootregs[12] != -1);
@@ -127,7 +127,7 @@ autoconf()
volatile int tickcnt;
int
-getsecs()
+getsecs(void)
{
return tickcnt/100;
}
@@ -152,7 +152,7 @@ mcheck(void *arg)
* to detect unwanted interrupts.
*/
void
-scbinit()
+scbinit(void)
{
int i;
diff --git a/sys/arch/vax/stand/boot/boot.c b/sys/arch/vax/stand/boot/boot.c
index 09496d0631d..4d0986b3f4e 100644
--- a/sys/arch/vax/stand/boot/boot.c
+++ b/sys/arch/vax/stand/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.11 2003/06/02 23:27:57 millert Exp $ */
+/* $OpenBSD: boot.c,v 1.12 2003/08/15 23:16:30 deraadt Exp $ */
/* $NetBSD: boot.c,v 1.18 2002/05/31 15:58:26 ragge Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -283,7 +283,7 @@ load:
void
-loadpcs()
+loadpcs(void)
{
static int pcsdone = 0;
int mid = mfpr(PR_SID);
diff --git a/sys/arch/vax/stand/boot/ctu.c b/sys/arch/vax/stand/boot/ctu.c
index b8a9b863faf..a10824dcf85 100644
--- a/sys/arch/vax/stand/boot/ctu.c
+++ b/sys/arch/vax/stand/boot/ctu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ctu.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */
+/* $OpenBSD: ctu.c,v 1.4 2003/08/15 23:16:30 deraadt Exp $ */
/* $NetBSD: ctu.c,v 1.3 2000/05/20 13:30:03 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -67,9 +67,7 @@ void ctutintr(void);
void cturintr(void);
int
-ctuopen(f, adapt, ctlr, unit, part)
- struct open_file *f;
- int ctlr, unit, part;
+ctuopen(struct open_file *f, int adapt, int ctlr, int unit, int part)
{
tu_sc.sc_state = SC_INIT;
@@ -82,12 +80,7 @@ ctuopen(f, adapt, ctlr, unit, part)
}
int
-ctustrategy(f, func, dblk, size, buf, rsize)
- void *f;
- int func;
- daddr_t dblk;
- void *buf;
- size_t size, *rsize;
+ctustrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize)
{
struct rsp *rsp = (struct rsp *)tu_sc.sc_rsp;
@@ -114,7 +107,7 @@ ctustrategy(f, func, dblk, size, buf, rsize)
}
void
-cturintr()
+cturintr(void)
{
int status;
@@ -154,7 +147,7 @@ cturintr()
}
void
-ctutintr()
+ctutintr(void)
{
int c;
@@ -170,9 +163,7 @@ ctutintr()
}
short
-ctu_cksum(buf, words)
- unsigned short *buf;
- int words;
+ctu_cksum(unsigned short *buf, int words)
{
int i, cksum;
diff --git a/sys/arch/vax/stand/boot/mfm.c b/sys/arch/vax/stand/boot/mfm.c
index 761104bd8c1..b2af22aa847 100644
--- a/sys/arch/vax/stand/boot/mfm.c
+++ b/sys/arch/vax/stand/boot/mfm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfm.c,v 1.3 2002/06/11 09:36:23 hugh Exp $ */
+/* $OpenBSD: mfm.c,v 1.4 2003/08/15 23:16:30 deraadt Exp $ */
/* $NetBSD: mfm.c,v 1.4 2001/07/26 22:55:13 wiz Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -99,7 +99,7 @@ static int mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *bu
* instruction. Thus the loop-overhead will be enough...
*/
static void
-sreg_read()
+sreg_read(void)
{
int i;
char *p;
@@ -111,7 +111,7 @@ sreg_read()
}
static void
-creg_write()
+creg_write(void)
{
int i;
char *p;
@@ -131,7 +131,7 @@ creg_write()
* ready...
*/
int
-mfm_rxprepare()
+mfm_rxprepare(void)
{
int error;
@@ -339,8 +339,7 @@ volatile struct mfm_xbn {
} mfm_xbn;
#ifdef verbose
-display_xbn(p)
- struct mfm_xbn *p;
+display_xbn(struct mfm_xbn *p)
{
printf("**DiskData** XBNs: %d, DBNs: %d, LBNs: %d, RBNs: %d\n",
p->xbn_count, p->dbn_count, p->lbn_count, p->rbn_count);
@@ -359,9 +358,7 @@ display_xbn(p)
#endif
int
-mfmopen(f, adapt, ctlr, unit, part)
- struct open_file *f;
- int ctlr, unit, part;
+mfmopen(struct open_file *f, int adapt, int ctlr, int unit, int part)
{
char *msg;
struct disklabel *lp = &mfmlabel;
@@ -455,7 +452,8 @@ mfmopen(f, adapt, ctlr, unit, part)
}
int
-mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) {
+mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize)
+{
struct mfm_softc *msc = f;
struct disklabel *lp;
int block, sect, head, cyl, scount, res;
@@ -540,7 +538,8 @@ mfm_rxstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *
}
int
-mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize) {
+mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize)
+{
struct mfm_softc *msc = f;
struct disklabel *lp;
int block, sect, head, cyl, scount, cmd, res;
@@ -631,12 +630,7 @@ mfm_rdstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *
}
int
-mfmstrategy(f, func, dblk, size, buf, rsize)
- void *f;
- int func;
- daddr_t dblk;
- void *buf;
- size_t size, *rsize;
+mfmstrategy(void *f, int func, daddr_t dblk, size_t size, void *buf, size_t *rsize)
{
struct mfm_softc *msc = f;
int res = -1;
diff --git a/sys/arch/vax/stand/xxboot/bootxx.c b/sys/arch/vax/stand/xxboot/bootxx.c
index 9cdd9abfcf4..5bcf131282b 100644
--- a/sys/arch/vax/stand/xxboot/bootxx.c
+++ b/sys/arch/vax/stand/xxboot/bootxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bootxx.c,v 1.9 2003/06/02 23:27:57 millert Exp $ */
+/* $OpenBSD: bootxx.c,v 1.10 2003/08/15 23:16:30 deraadt Exp $ */
/* $NetBSD: bootxx.c,v 1.16 2002/03/29 05:45:08 matt Exp $ */
/*-
@@ -91,7 +91,7 @@ extern int from;
* VS3100/??, VS4000 and VAX6000/???, and only when booting from disk.
*/
void
-Xmain()
+Xmain(void)
{
union {
struct exec aout;
@@ -216,9 +216,7 @@ struct devsw devsw[] = {
int ndevs = (sizeof(devsw)/sizeof(devsw[0]));
int
-romopen(f, adapt, ctlr, unit, part)
- struct open_file *f;
- int adapt, ctlr, unit, part;
+romopen(struct open_file *f, int adapt, int ctlr, int unit, int part)
{
rom_softc.unit = unit;
rom_softc.part = part;
@@ -230,43 +228,8 @@ romopen(f, adapt, ctlr, unit, part)
#endif
-#if 0
-int tar_open(char *path, struct open_file *f);
-ssize_t tar_read(struct open_file *f, void *buf, size_t size, size_t *resid);
-
-int
-tar_open(path, f)
- char *path;
- struct open_file *f;
-{
- char *buf = alloc(512);
-
- bzero(buf, 512);
- romstrategy(0, 0, 8192, 512, buf, 0);
- if (bcmp(buf, "boot", 5) || bcmp(&buf[257], "ustar", 5))
- return EINVAL; /* Not a ustarfs with "boot" first */
- return 0;
-}
-
-ssize_t
-tar_read(f, buf, size, resid)
- struct open_file *f;
- void *buf;
- size_t size;
- size_t *resid;
-{
- romstrategy(0, 0, (8192+512), size, buf, 0);
- *resid = size;
- return 0; /* XXX */
-}
-#endif
-
-
int
-devopen(f, fname, file)
- struct open_file *f;
- const char *fname;
- char **file;
+devopen(struct open_file *f, const char *fname, char **file)
{
#ifdef LIBSA_TOO_OLD
@@ -409,8 +372,7 @@ extern char end[];
static char *top = (char*)end;
void *
-alloc(size)
- unsigned size;
+alloc(unsigned int size)
{
void *ut = top;
top += size;
@@ -418,19 +380,10 @@ alloc(size)
}
void
-free(ptr, size)
- void *ptr;
- unsigned size;
+free(void *ptr, unsigned int size)
{
}
-int
-romclose(f)
- struct open_file *f;
-{
- return 0;
-}
-
#ifdef USE_PRINTF
void
putchar(int ch)