Use prom_getoptionsnode().

This commit is contained in:
pk 2004-03-19 14:42:01 +00:00
parent aefad8a7e8
commit 90dbcf4919
1 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: openprom.c,v 1.15 2004/03/17 17:04:59 pk Exp $ */
/* $NetBSD: openprom.c,v 1.16 2004/03/19 14:42:01 pk Exp $ */
/*
* Copyright (c) 1992, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: openprom.c,v 1.15 2004/03/17 17:04:59 pk Exp $");
__KERNEL_RCSID(0, "$NetBSD: openprom.c,v 1.16 2004/03/19 14:42:01 pk Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -131,9 +131,11 @@ openpromioctl(dev, cmd, data, flags, p)
struct proc *p;
{
struct opiocdesc *op;
int node, len, ok, error, s;
int node, optionsnode, len, ok, error, s;
char *name, *value, *nextprop;
optionsnode = prom_getoptionsnode();
/* All too easy... */
if (cmd == OPIOCGETOPTNODE) {
*(int *)data = optionsnode;