De-__P();

This commit is contained in:
pk 2004-03-17 11:00:19 +00:00
parent 6446b225e5
commit da415e73f9
2 changed files with 82 additions and 83 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: promlib.h,v 1.14 2004/03/17 10:48:21 pk Exp $ */
/* $NetBSD: promlib.h,v 1.15 2004/03/17 11:00:19 pk Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -70,52 +70,52 @@ struct promops {
void *po_bootcookie;
/* Access to boot arguments */
char *(*po_bootpath) __P((void));
char *(*po_bootfile) __P((void));
char *(*po_bootargs) __P((void));
char *(*po_bootpath)(void);
char *(*po_bootfile)(void);
char *(*po_bootargs)(void);
/* I/O functions */
int (*po_getchar) __P((void));
int (*po_peekchar) __P((void));
void (*po_putchar) __P((int));
void (*po_putstr) __P((char *, int));
int (*po_open) __P((char *));
void (*po_close) __P((int));
int (*po_read) __P((int, void *, int));
int (*po_write) __P((int, void *, int));
int (*po_seek) __P((int, u_quad_t));
int (*po_getchar)(void);
int (*po_peekchar)(void);
void (*po_putchar)(int);
void (*po_putstr)(char *, int);
int (*po_open)(char *);
void (*po_close)(int);
int (*po_read)(int, void *, int);
int (*po_write)(int, void *, int);
int (*po_seek)(int, u_quad_t);
int (*po_instance_to_package) __P((int));
int (*po_instance_to_package)(int);
/* Misc functions (common in OBP 0,2,3) */
void (*po_halt) __P((void)) __attribute__((__noreturn__));
void (*po_reboot) __P((char *)) __attribute__((__noreturn__));
void (*po_abort) __P((void));
void (*po_interpret) __P((char *));
void (*po_setcallback) __P((void (*)__P((void))));
int (*po_ticks) __P((void));
void (*po_halt)(void) __attribute__((__noreturn__));
void (*po_reboot)(char *) __attribute__((__noreturn__));
void (*po_abort)(void);
void (*po_interpret)(char *);
void (*po_setcallback)(void (*)(void));
int (*po_ticks)(void);
void *po_tickdata;
/* sun4/sun4c only */
void (*po_setcontext) __P((int ctxt, caddr_t va, int pmeg));
void (*po_setcontext)(int ctxt, caddr_t va, int pmeg);
/* MP functions (OBP v3 only) */
int (*po_cpustart) __P((int, struct openprom_addr *, int, caddr_t));
int (*po_cpustop) __P((int));
int (*po_cpuidle) __P((int));
int (*po_cpuresume) __P((int));
int (*po_cpustart)(int, struct openprom_addr *, int, caddr_t);
int (*po_cpustop)(int);
int (*po_cpuidle)(int);
int (*po_cpuresume)(int);
/* Device node traversal (OBP v0, v2, v3; but not sun4) */
int (*po_firstchild) __P((int));
int (*po_nextsibling) __P((int));
int (*po_firstchild)(int);
int (*po_nextsibling)(int);
/* Device node properties */
int (*po_getproplen) __P((int node, char *name));
int (*po_getprop) __P((int node, char *name, void *, int));
int (*po_setprop) __P((int node, char *name, const void *, int));
char *(*po_nextprop) __P((int node, char *name));
int (*po_getproplen)(int node, char *name);
int (*po_getprop)(int node, char *name, void *, int);
int (*po_setprop)(int node, char *name, const void *, int);
char *(*po_nextprop)(int node, char *name);
int (*po_finddevice) __P((char *name));
int (*po_finddevice)(char *name);
};
@ -137,23 +137,22 @@ int prom_makememarr(struct memarr *, int max, int which);
struct idprom *prom_getidprom(void);
void prom_getether(int, u_char *);
void prom_init __P((void)); /* To setup promops */
void prom_init(void); /* To setup promops */
/* Utility routines */
/*int prom_prop __P((int, char *, int, int *, void **));*/
int PROM_getprop __P((int, char *, size_t, int *, void *));
int PROM_getpropint __P((int node, char *name, int deflt));
char *PROM_getpropstring __P((int node, char *name));
char *PROM_getpropstringA __P((int node, char *name, char *, size_t));
void prom_printf __P((const char *, ...));
int PROM_getprop(int, char *, size_t, int *, void *);
int PROM_getpropint(int node, char *name, int deflt);
char *PROM_getpropstring(int node, char *name);
char *PROM_getpropstringA(int node, char *name, char *, size_t);
void prom_printf(const char *, ...);
int prom_findroot __P((void));
int prom_findnode __P((int, const char *));
int prom_search __P((int, const char *));
int prom_opennode __P((char *));
int prom_node_has_property __P((int, const char *));
int prom_getoptionsnode __P((void));
int prom_getoption __P((const char *name, char *buf, int buflen));
int prom_findroot(void);
int prom_findnode(int, const char *);
int prom_search(int, const char *);
int prom_opennode(char *);
int prom_node_has_property(int, const char *);
int prom_getoptionsnode(void);
int prom_getoption(const char *name, char *buf, int buflen);
#define findroot() prom_findroot()
#define findnode(node,name) prom_findnode(node,name)
@ -161,8 +160,8 @@ int prom_getoption __P((const char *name, char *buf, int buflen));
#define opennode(name) prom_opennode(name)
#define node_has_property(node,prop) prom_node_has_property(node,prop)
void prom_halt __P((void)) __attribute__((__noreturn__));
void prom_boot __P((char *)) __attribute__((__noreturn__));
void prom_halt(void) __attribute__((__noreturn__));
void prom_boot(char *) __attribute__((__noreturn__));
#if defined(MULTIPROCESSOR)
#define callrom() do { \

View File

@ -1,4 +1,4 @@
/* $NetBSD: promlib.c,v 1.27 2004/03/17 10:48:21 pk Exp $ */
/* $NetBSD: promlib.c,v 1.28 2004/03/17 11:00:19 pk Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: promlib.c,v 1.27 2004/03/17 10:48:21 pk Exp $");
__KERNEL_RCSID(0, "$NetBSD: promlib.c,v 1.28 2004/03/17 11:00:19 pk Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sparc_arch.h"
@ -69,34 +69,34 @@ __KERNEL_RCSID(0, "$NetBSD: promlib.c,v 1.27 2004/03/17 10:48:21 pk Exp $");
#define obpvec ((struct promvec *)romp)
static void notimplemented __P((void));
static void obp_v0_fortheval __P((char *));
static void obp_set_callback __P((void (*)__P((void))));
static int obp_v0_read __P((int, void *, int));
static int obp_v0_write __P((int, void *, int));
static int obp_v2_getchar __P((void));
static int obp_v2_peekchar __P((void));
static void obp_v2_putchar __P((int));
static void obp_v2_putstr __P((char *, int));
static int obp_v2_seek __P((int, u_quad_t));
static char *parse_bootfile __P((char *));
static char *parse_bootargs __P((char *));
static char *obp_v0_getbootpath __P((void));
static char *obp_v0_getbootfile __P((void));
static char *obp_v0_getbootargs __P((void));
static char *obp_v2_getbootpath __P((void));
static char *obp_v2_getbootfile __P((void));
static char *obp_v2_getbootargs __P((void));
static int obp_v2_finddevice __P((char *));
static int obp_ticks __P((void));
static void notimplemented(void);
static void obp_v0_fortheval(char *);
static void obp_set_callback(void (*)(void));
static int obp_v0_read(int, void *, int);
static int obp_v0_write(int, void *, int);
static int obp_v2_getchar(void);
static int obp_v2_peekchar(void);
static void obp_v2_putchar(int);
static void obp_v2_putstr(char *, int);
static int obp_v2_seek(int, u_quad_t);
static char *parse_bootfile(char *);
static char *parse_bootargs(char *);
static char *obp_v0_getbootpath(void);
static char *obp_v0_getbootfile(void);
static char *obp_v0_getbootargs(void);
static char *obp_v2_getbootpath(void);
static char *obp_v2_getbootfile(void);
static char *obp_v2_getbootargs(void);
static int obp_v2_finddevice(char *);
static int obp_ticks(void);
static int findchosen __P((void));
static char *opf_getbootpath __P((void));
static char *opf_getbootfile __P((void));
static char *opf_getbootargs __P((void));
static int opf_finddevice __P((char *));
static int opf_instance_to_package __P((int));
static char *opf_nextprop __P((int, char *));
static int findchosen(void);
static char *opf_getbootpath(void);
static char *opf_getbootfile(void);
static char *opf_getbootargs(void);
static int opf_finddevice(char *);
static int opf_instance_to_package(int);
static char *opf_nextprop(int, char *);
/*
@ -764,7 +764,7 @@ obp_v2_putstr(str, len)
void
obp_set_callback(f)
void (*f)__P((void));
void (*f)(void);
{
*obpvec->pv_synchook = f;
}
@ -1064,15 +1064,15 @@ read_idprom:
memcpy(cp, idp->id_ether, 6);
}
static void prom_init_oldmon __P((void));
static void prom_init_obp __P((void));
static void prom_init_opf __P((void));
static void prom_init_oldmon(void);
static void prom_init_obp(void);
static void prom_init_opf(void);
static __inline__ void
prom_init_oldmon()
{
struct om_vector *oldpvec = (struct om_vector *)PROM_BASE;
extern void sparc_noop __P((void));
extern void sparc_noop(void);
promops.po_version = PROM_OLDMON;
promops.po_revision = oldpvec->monId[0]; /*XXX*/
@ -1100,7 +1100,7 @@ prom_init_oldmon()
#ifdef SUN4
#ifndef _STANDALONE
if (oldpvec->romvecVersion >= 2) {
extern void oldmon_w_cmd __P((u_long, char *));
extern void oldmon_w_cmd(u_long, char *);
*oldpvec->vector_cmd = oldmon_w_cmd;
}
#endif