summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-09-30 19:42:00 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-09-30 19:42:00 +0000
commit972c3d722dcbd0f859155224a937bcff54d82014 (patch)
tree7450aa954fa5fd1ef58d9185d12800b1513dfc71 /sys/arch
parentdacf1fbd64ad15989a056e3dc348a3589844744c (diff)
Get rid of prom_open() and implement it directly as a prom_dispatch() wrapper,
necessary for some old SRM version. From NetBSD.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/include/prom.h5
-rw-r--r--sys/arch/alpha/stand/prom.c16
2 files changed, 4 insertions, 17 deletions
diff --git a/sys/arch/alpha/include/prom.h b/sys/arch/alpha/include/prom.h
index a4863cc0eee..82743511d69 100644
--- a/sys/arch/alpha/include/prom.h
+++ b/sys/arch/alpha/include/prom.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: prom.h,v 1.8 2000/11/08 21:27:22 ericj Exp $ */
+/* $OpenBSD: prom.h,v 1.9 2009/09/30 19:41:54 miod Exp $ */
/* $NetBSD: prom.h,v 1.12 2000/06/08 03:10:06 thorpej Exp $ */
/*
@@ -49,7 +49,6 @@ typedef union {
#ifdef _STANDALONE
int getchar(void);
-int prom_open(char *, int);
void putchar(int);
#endif
@@ -93,6 +92,8 @@ void hwrpb_restart_setup(void);
* either don't need to copy anything, or don't need the copy because it's
* already being done elsewhere, are defined here.
*/
+#define prom_open(dev, len) \
+ prom_dispatch(PROM_R_OPEN, (dev), (len), 0, 0)
#define prom_close(chan) \
prom_dispatch(PROM_R_CLOSE, chan, 0, 0, 0)
#define prom_read(chan, len, buf, blkno) \
diff --git a/sys/arch/alpha/stand/prom.c b/sys/arch/alpha/stand/prom.c
index 7c7ed64672d..8216b831246 100644
--- a/sys/arch/alpha/stand/prom.c
+++ b/sys/arch/alpha/stand/prom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prom.c,v 1.5 1997/01/24 19:58:07 niklas Exp $ */
+/* $OpenBSD: prom.c,v 1.6 2009/09/30 19:41:59 miod Exp $ */
/* $NetBSD: prom.c,v 1.2 1996/11/25 16:18:16 cgd Exp $ */
/*
@@ -100,17 +100,3 @@ prom_getenv(id, buf, len)
return (ret.u.retval);
}
-
-int
-prom_open(dev, len)
- char *dev;
- int len;
-{
- prom_return_t ret;
-
- ret.bits = prom_dispatch(PROM_R_OPEN, dev, len);
- if (ret.u.status & 0x4)
- return (-1);
- else
- return (ret.u.retval);
-}