/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "benv.h"
#include <sys/ddi_impldefs.h>
#include <sys/openpromio.h>
#include <stdio.h>
static int prom_fd;
/*
* 128 is the size of the largest (currently) property name
* 16384 - MAXPROPSIZE - sizeof (int) is the size of the largest
* (currently) property value that is allowed.
* the sizeof (u_int) is from struct openpromio
*/
typedef union {
} Oppbuf;
typedef union {
} Oppbuf_small;
static unsigned long
{
return (0);
return (*(unsigned long *)opp->oprom_array);
}
static unsigned long
{
return (0);
return (*(unsigned long *)opp->oprom_array);
}
/*
* Find a node by name from the prom device tree.
* Return the id or 0 if it is not found.
*/
static unsigned long
{
unsigned long nid;
if (id == 0)
return (0);
return (0);
return (id);
return (nid);
return (nid);
return (0);
}
/*
* Make the current prom node be the rootnode and return its id.
*/
static unsigned long
{
return (next(0));
}
static int
{
return (0);
if (opp->oprom_size == 0)
return (0);
return (1);
}
static int
{
return (0);
if (opp->oprom_size == 0)
return (0);
return (1);
}
char *
getbootcmd(void)
{
return (NULL);
return (opp->oprom_array);
}
/*
* Get a pointer to the requested property from the current node.
* The property is stored in static storage and the returned pointer
* points into the static storage. The property length is placed in
* the location pointed to by the third argument.
*/
static unsigned char *
{
return (NULL);
return ((unsigned char *)opp->oprom_array);
}
static unsigned char *
{
return ((unsigned char *)0);
return ((unsigned char *)opp->oprom_array);
}
{
unsigned char *propval;
unsigned long id;
if (id == 0)
return (plist);
curprop = "";
if (npp == 0)
} else
} else {
}
}
return (plist);
}
{
return (NULL);
return (NULL);
}
void
get_kbenv(void)
{
}
}
void
close_kbenv(void)
{
}