diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-08-20 00:26:01 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-08-20 00:26:01 +0000 |
commit | e7db268bb31fed767ab31e00816ace537ea48ff6 (patch) | |
tree | 970197661fe121615263cadbe13563cbf170c678 /sys/arch/mvme68k/stand/libsa | |
parent | 4055d06426455f14922e0519ecf6eb7c4851abe2 (diff) |
ansi and protos for the rest
Diffstat (limited to 'sys/arch/mvme68k/stand/libsa')
-rw-r--r-- | sys/arch/mvme68k/stand/libsa/bugdev.c | 36 | ||||
-rw-r--r-- | sys/arch/mvme68k/stand/libsa/clock.c | 15 | ||||
-rw-r--r-- | sys/arch/mvme68k/stand/libsa/exec_mvme.c | 20 | ||||
-rw-r--r-- | sys/arch/mvme68k/stand/libsa/libsa.h | 4 |
4 files changed, 30 insertions, 45 deletions
diff --git a/sys/arch/mvme68k/stand/libsa/bugdev.c b/sys/arch/mvme68k/stand/libsa/bugdev.c index 0c0b9ec13db..581a39836f5 100644 --- a/sys/arch/mvme68k/stand/libsa/bugdev.c +++ b/sys/arch/mvme68k/stand/libsa/bugdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bugdev.c,v 1.2 2002/03/14 01:26:38 millert Exp $ */ +/* $OpenBSD: bugdev.c,v 1.3 2003/08/20 00:26:00 deraadt Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -50,10 +50,7 @@ struct bugsc_softc { } bugsc_softc[1]; int -devopen(f, fname, file) - struct open_file *f; - const char *fname; - char **file; +devopen(struct open_file *f, const char *fname, char **file) { register struct bugsc_softc *pp = &bugsc_softc[0]; int error, i, dn = 0, pn = 0; @@ -98,14 +95,10 @@ devopen(f, fname, file) /* silly block scale factor */ #define BUG_BLOCK_SIZE 256 #define BUG_SCALE (512/BUG_BLOCK_SIZE) + int -bugscstrategy(devdata, func, dblk, size, buf, rsize) - void *devdata; - int func; - daddr_t dblk; - size_t size; - void *buf; - size_t *rsize; +bugscstrategy(void *devdata, int func, daddr_t dblk, size_t size, void *buf, + size_t *rsize) { struct mvmeprom_dskio dio; register struct bugsc_softc *pp = (struct bugsc_softc *)devdata; @@ -138,8 +131,7 @@ printf("rsize %d status %x\n", *rsize, dio.status); } int -bugscopen(f) - struct open_file *f; +bugscopen(struct open_file *f) { #ifdef DEBUG printf("bugscopen:\n"); @@ -156,25 +148,19 @@ bugscopen(f) } int -bugscclose(f) - struct open_file *f; +bugscclose(struct open_file *f) { return (EIO); } int -bugscioctl(f, cmd, data) - struct open_file *f; - u_long cmd; - void *data; +bugscioctl(struct open_file *f, u_long cmd, void *data) { return (EIO); } void -cputobsdlabel(lp, clp) - struct disklabel *lp; - struct cpu_disklabel *clp; +cputobsdlabel(struct disklabel *lp, struct cpu_disklabel *clp) { int i; @@ -233,6 +219,6 @@ cputobsdlabel(lp, clp) lp->d_bbsize = clp->bbsize; lp->d_sbsize = clp->sbsize; bcopy(clp->vid_4, &(lp->d_partitions[0]),sizeof (struct partition) * 4); - bcopy(clp->cfg_4, &(lp->d_partitions[4]), sizeof (struct partition) - * ((MAXPARTITIONS < 16) ? (MAXPARTITIONS - 4) : 12)); + bcopy(clp->cfg_4, &(lp->d_partitions[4]), sizeof (struct partition) * + ((MAXPARTITIONS < 16) ? (MAXPARTITIONS - 4) : 12)); } diff --git a/sys/arch/mvme68k/stand/libsa/clock.c b/sys/arch/mvme68k/stand/libsa/clock.c index 4f56fb85372..b0d66b22da9 100644 --- a/sys/arch/mvme68k/stand/libsa/clock.c +++ b/sys/arch/mvme68k/stand/libsa/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.3 1996/05/16 02:30:38 chuck Exp $ */ +/* $OpenBSD: clock.c,v 1.4 2003/08/20 00:26:00 deraadt Exp $ */ #include <sys/types.h> #include <machine/prom.h> @@ -23,11 +23,10 @@ * Will Unix still be here then?? */ const short dayyr[12] = -{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; + {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; -static u_long -chiptotime(sec, min, hour, day, mon, year) - register int sec, min, hour, day, mon, year; +static u_long +chiptotime(int sec, int min, int hour, int day, int mon, int year) { register int days, yr; @@ -54,11 +53,11 @@ chiptotime(sec, min, hour, day, mon, year) } time_t -getsecs() +getsecs(void) { struct mvmeprom_time m; mvmeprom_rtc_rd(&m); - return (chiptotime(m.sec_BCD, m.min_BCD, m.hour_BCD, m.day_BCD, - m.month_BCD, m.year_BCD)); + return (chiptotime(m.sec_BCD, m.min_BCD, m.hour_BCD, m.day_BCD, + m.month_BCD, m.year_BCD)); } diff --git a/sys/arch/mvme68k/stand/libsa/exec_mvme.c b/sys/arch/mvme68k/stand/libsa/exec_mvme.c index 1718092ecaa..ae6704f0630 100644 --- a/sys/arch/mvme68k/stand/libsa/exec_mvme.c +++ b/sys/arch/mvme68k/stand/libsa/exec_mvme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_mvme.c,v 1.5 2003/06/02 23:27:51 millert Exp $ */ +/* $OpenBSD: exec_mvme.c,v 1.6 2003/08/20 00:26:00 deraadt Exp $ */ /* $NetBSD: exec_sun.c,v 1.5 1996/01/29 23:41:06 gwr Exp $ */ /*- @@ -50,7 +50,7 @@ exec_mvme(file, flag) register int io; struct exec x; int cc, magic; - void (*entry)(); + void (*entry)(int, u_int, int, int, int, void *); register char *cp; register int *ip; @@ -73,11 +73,11 @@ exec_mvme(file, flag) } /* - * note: on the mvme ports, the kernel is linked in such a way that - * its entry point is the first item in .text, and thus a_entry can + * note: on the mvme ports, the kernel is linked in such a way that + * its entry point is the first item in .text, and thus a_entry can * be used to determine both the load address and the entry point. * (also note that we make use of the fact that the kernel will live - * in a VA == PA range of memory ... otherwise we would take + * in a VA == PA range of memory ... otherwise we would take * loadaddr as a parameter and let the kernel relocate itself!) * * note that ZMAGIC files included the a.out header in the text area @@ -89,7 +89,7 @@ exec_mvme(file, flag) magic = N_GETMAGIC(x); if (magic == ZMAGIC) cp += sizeof(x); - entry = (void (*)())cp; + entry = (void (*)(int, u_int, int, int, int, void *))cp; /* * Leave a copy of the exec header before the text. @@ -103,7 +103,7 @@ exec_mvme(file, flag) */ printf("%d", x.a_text); cc = x.a_text; - if (magic == ZMAGIC) + if (magic == ZMAGIC) cc = cc - sizeof(x); /* a.out header part of text in zmagic */ if (read(io, cp, cc) != cc) goto shread; @@ -157,7 +157,7 @@ exec_mvme(file, flag) if (read(io, cp, cc) != cc) goto shread; cp += x.a_syms; - ip = (int *)cp; /* points to strtab length */ + ip = (int *)cp; /* points to strtab length */ cp += sizeof(int); /* String table. Length word includes itself. */ @@ -174,8 +174,8 @@ exec_mvme(file, flag) close(io); printf("Start @ 0x%x ...\n", (int)entry); - (*entry)(flag, bugargs.ctrl_addr, - bugargs.ctrl_lun, bugargs.dev_lun, 0, cp); + (*entry)(flag, bugargs.ctrl_addr, bugargs.ctrl_lun, + bugargs.dev_lun, 0, cp); printf("exec: kernel returned!\n"); return; diff --git a/sys/arch/mvme68k/stand/libsa/libsa.h b/sys/arch/mvme68k/stand/libsa/libsa.h index da15e3a0ac5..3d355a73c1d 100644 --- a/sys/arch/mvme68k/stand/libsa/libsa.h +++ b/sys/arch/mvme68k/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libsa.h,v 1.5 2002/03/14 01:26:38 millert Exp $ */ +/* $OpenBSD: libsa.h,v 1.6 2003/08/20 00:26:00 deraadt Exp $ */ /* * libsa prototypes @@ -7,7 +7,7 @@ #include "libbug.h" /* bugdev.c */ -int bugscopen(struct open_file *, ...); +int bugscopen(struct open_file *); int bugscclose(struct open_file *); int bugscioctl(struct open_file *, u_long, void *); int bugscstrategy(void *, int, daddr_t, size_t, void *, size_t *); |