Add OF_nextprop and required conf-glue for /dev/openfirm.
This commit is contained in:
parent
7308e15009
commit
edc0af8cd3
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: conf.c,v 1.43 2000/09/23 04:30:08 augustss Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.44 2000/11/14 07:13:03 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
|
@ -194,6 +194,7 @@ int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
|
|||
#include "wsmouse.h"
|
||||
#include "wsmux.h"
|
||||
#include "scsibus.h"
|
||||
#include "openfirm.h"
|
||||
|
||||
/* Character devices */
|
||||
|
||||
|
@ -283,6 +284,11 @@ struct cdevsw cdevsw[] = {
|
|||
cdev_tty_init(NUCOM,ucom), /* 74: USB tty */
|
||||
cdev_usbdev_init(NURIO,urio), /* 75: Diamond Rio 500 */
|
||||
cdev_ugen_init(NUSCANNER,uscanner),/* 76: USB scanner */
|
||||
#if (defined(OFWGENCFG) || defined(SHARK))
|
||||
cdev_openfirm_init(NOPENFIRM,openfirm),/* 77: openfirmware */
|
||||
#else
|
||||
cdev_notdef(), /* 77: */
|
||||
#endif
|
||||
};
|
||||
|
||||
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
|
||||
|
@ -401,6 +407,7 @@ static int chrtoblktbl[] = {
|
|||
/* 74 */ NODEV,
|
||||
/* 75 */ NODEV,
|
||||
/* 76 */ NODEV,
|
||||
/* 77 */ NODEV,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: conf.h,v 1.14 2000/09/23 04:30:09 augustss Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.15 2000/11/14 07:13:02 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe.
|
||||
|
@ -167,3 +167,4 @@ cdev_decl(wskbd);
|
|||
cdev_decl(wsmouse);
|
||||
cdev_decl(wsmux);
|
||||
cdev_decl(scsibus);
|
||||
cdev_decl(openfirm);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: openfirm.c,v 1.3 1998/05/01 21:18:44 cgd Exp $ */
|
||||
/* $NetBSD: openfirm.c,v 1.4 2000/11/14 07:13:02 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997
|
||||
|
@ -172,6 +172,35 @@ OF_instance_to_package(ihandle)
|
|||
return args.phandle;
|
||||
}
|
||||
|
||||
int
|
||||
OF_nextprop(handle, prop, nextprop)
|
||||
int handle;
|
||||
char *prop;
|
||||
char *nextprop;
|
||||
{
|
||||
static struct {
|
||||
char *name;
|
||||
int nargs;
|
||||
int nreturns;
|
||||
int phandle;
|
||||
char *prop;
|
||||
char *nextprop;
|
||||
int flags;
|
||||
} args = {
|
||||
"nextprop",
|
||||
3,
|
||||
1,
|
||||
};
|
||||
|
||||
args.phandle = handle;
|
||||
args.prop = prop;
|
||||
args.nextprop = nextprop;
|
||||
|
||||
if (openfirmware(&args) == -1)
|
||||
return -1;
|
||||
return args.flags;
|
||||
}
|
||||
|
||||
int
|
||||
OF_getprop(handle, prop, buf, buflen)
|
||||
int handle;
|
||||
|
|
Loading…
Reference in New Issue