Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/stand/ofwboot ANSIfy and clean up prototypes.
details: https://anonhg.NetBSD.org/src/rev/f83a368359f6
branches: trunk
changeset: 556746:f83a368359f6
user: aymeric <aymeric%NetBSD.org@localhost>
date: Fri Dec 26 13:43:29 2003 +0000
description:
ANSIfy and clean up prototypes.
This has been lying around in my tree for too long now.
diffstat:
sys/arch/macppc/stand/ofwboot/Locore.c | 109 ++++++++----------------------
sys/arch/macppc/stand/ofwboot/alloc.c | 15 +--
sys/arch/macppc/stand/ofwboot/boot.c | 29 +++----
sys/arch/macppc/stand/ofwboot/boot.h | 16 ++++
sys/arch/macppc/stand/ofwboot/hfs.c | 28 +-----
sys/arch/macppc/stand/ofwboot/net.c | 16 ++-
sys/arch/macppc/stand/ofwboot/net.h | 9 ++
sys/arch/macppc/stand/ofwboot/netif_of.c | 24 +----
sys/arch/macppc/stand/ofwboot/ofdev.c | 39 ++++------
sys/arch/macppc/stand/ofwboot/ofdev.h | 4 +-
sys/arch/macppc/stand/ofwboot/openfirm.h | 35 +++++----
11 files changed, 131 insertions(+), 193 deletions(-)
diffs (truncated from 851 to 300 lines):
diff -r 6610ac35da58 -r f83a368359f6 sys/arch/macppc/stand/ofwboot/Locore.c
--- a/sys/arch/macppc/stand/ofwboot/Locore.c Fri Dec 26 13:25:00 2003 +0000
+++ b/sys/arch/macppc/stand/ofwboot/Locore.c Fri Dec 26 13:43:29 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: Locore.c,v 1.14 2003/04/02 03:16:39 thorpej Exp $ */
+/* $NetBSD: Locore.c,v 1.15 2003/12/26 13:43:29 aymeric Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -38,10 +38,10 @@
#include "openfirm.h"
-static int (*openfirmware) __P((void *));
+static int (*openfirmware)(void *);
-static void startup __P((void *, int, int (*)(void *), char *, int));
-static void setup __P((void));
+static void startup(void *, int, int (*)(void *), char *, int);
+static void setup(void);
static int stack[8192/4 + 4];
@@ -94,8 +94,7 @@
#if 0
static int
-openfirmware(arg)
- void *arg;
+openfirmware(void *arg)
{
asm volatile ("sync; isync");
@@ -105,12 +104,7 @@
#endif
static void
-startup(vpd, res, openfirm, arg, argl)
- void *vpd;
- int res;
- int (*openfirm)(void *);
- char *arg;
- int argl;
+startup(void *vpd, int res, int (*openfirm)(void *), char *arg, int argl)
{
extern char etext[], _end[], _edata[];
@@ -122,7 +116,7 @@
}
__dead void
-OF_exit()
+OF_exit(void)
{
static struct {
char *name;
@@ -139,8 +133,7 @@
}
int
-OF_finddevice(name)
- char *name;
+OF_finddevice(char *name)
{
static struct {
char *name;
@@ -161,8 +154,7 @@
}
int
-OF_instance_to_package(ihandle)
- int ihandle;
+OF_instance_to_package(int ihandle)
{
static struct {
char *name;
@@ -183,11 +175,7 @@
}
int
-OF_getprop(handle, prop, buf, buflen)
- int handle;
- char *prop;
- void *buf;
- int buflen;
+OF_getprop(int handle, char *prop, void *buf, int buflen)
{
static struct {
char *name;
@@ -215,11 +203,7 @@
#ifdef __notyet__ /* Has a bug on FirePower */
int
-OF_setprop(handle, prop, buf, len)
- int handle;
- char *prop;
- void *buf;
- int len;
+OF_setprop(int handle, char *prop, void *buf, int len)
{
static struct {
char *name;
@@ -247,8 +231,7 @@
#endif
int
-OF_open(dname)
- char *dname;
+OF_open(char *dname)
{
static struct {
char *name;
@@ -280,8 +263,7 @@
}
void
-OF_close(handle)
- int handle;
+OF_close(int handle)
{
static struct {
char *name;
@@ -302,10 +284,7 @@
}
int
-OF_write(handle, addr, len)
- int handle;
- void *addr;
- int len;
+OF_write(int handle, void *addr, int len)
{
static struct {
char *name;
@@ -323,7 +302,7 @@
#ifdef OFW_DEBUG
if (len != 1)
- printf("OF_write(%d, %x, %x) -> ", handle, addr, len);
+ printf("OF_write(%d, %p, %x) -> ", handle, addr, len);
#endif
args.ihandle = handle;
args.addr = addr;
@@ -342,10 +321,7 @@
}
int
-OF_read(handle, addr, len)
- int handle;
- void *addr;
- int len;
+OF_read(int handle, void *addr, int len)
{
static struct {
char *name;
@@ -363,7 +339,7 @@
#ifdef OFW_DEBUG
if (len != 1)
- printf("OF_read(%d, %x, %x) -> ", handle, addr, len);
+ printf("OF_read(%d, %p, %x) -> ", handle, addr, len);
#endif
args.ihandle = handle;
args.addr = addr;
@@ -382,9 +358,7 @@
}
int
-OF_seek(handle, pos)
- int handle;
- u_quad_t pos;
+OF_seek(int handle, u_quad_t pos)
{
static struct {
char *name;
@@ -419,10 +393,7 @@
}
void *
-OF_claim(virt, size, align)
- void *virt;
- u_int size;
- u_int align;
+OF_claim(void *virt, u_int size, u_int align)
{
static struct {
char *name;
@@ -439,7 +410,7 @@
};
#ifdef OFW_DEBUG
- printf("OF_claim(%x, %x, %x) -> ", virt, size, align);
+ printf("OF_claim(%p, %x, %x) -> ", virt, size, align);
#endif
args.virt = virt;
args.size = size;
@@ -451,15 +422,13 @@
return (void *)-1;
}
#ifdef OFW_DEBUG
- printf("%x\n", args.baseaddr);
+ printf("%p\n", args.baseaddr);
#endif
return args.baseaddr;
}
void
-OF_release(virt, size)
- void *virt;
- u_int size;
+OF_release(void *virt, u_int size)
{
static struct {
char *name;
@@ -474,7 +443,7 @@
};
#ifdef OFW_DEBUG
- printf("OF_release(%x, %x)\n", virt, size);
+ printf("OF_release(%p, %x)\n", virt, size);
#endif
args.virt = virt;
args.size = size;
@@ -482,7 +451,7 @@
}
int
-OF_milliseconds()
+OF_milliseconds(void)
{
static struct {
char *name;
@@ -501,12 +470,7 @@
#ifdef __notyet__
void
-OF_chain(virt, size, entry, arg, len)
- void *virt;
- u_int size;
- void (*entry)();
- void *arg;
- u_int len;
+OF_chain(void *virt, u_int size, void (*entry)(), void *arg, u_int len)
{
static struct {
char *name;
@@ -532,12 +496,7 @@
}
#else
void
-OF_chain(virt, size, entry, arg, len)
- void *virt;
- u_int size;
- void (*entry)();
- void *arg;
- u_int len;
+OF_chain(void *virt, u_int size, boot_entry_t entry, void *arg, u_int len)
{
/*
* This is a REALLY dirty hack till the firmware gets this going
@@ -550,16 +509,7 @@
#endif
int
-#ifdef __STDC__
OF_call_method(char *method, int ihandle, int nargs, int nreturns, ...)
-#else
-OF_call_method(method, ihandle, nargs, nreturns, va_alist)
- char *method;
- int ihandle;
- int nargs;
- int nreturns;
- va_dcl
-#endif
{
va_list ap;
static struct {
@@ -604,7 +554,7 @@
static int stdout;
static void
-setup()
+setup(void)
{
int chosen;
@@ -618,8 +568,7 @@
}
void
-putchar(c)
- int c;
+putchar(int c)
{
char ch = c;
@@ -629,7 +578,7 @@
}
int
Home |
Main Index |
Thread Index |
Old Index