/*
* 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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdarg.h>
#include <strings.h>
#include <limits.h>
#include <syslog.h>
#include <string.h>
#include <alloca.h>
#include <libintl.h>
#include <sys/systeminfo.h>
#include <picl.h>
#include <picltree.h>
#include <fru_access.h>
#include <sys/sgfrutree.h>
/*
* these functions will overlay the symbol table of libfruaccess
* at runtime
*/
door_cred_t *cred);
door_cred_t *cred);
static int
fru_open_dev(void)
{
static int opendevfru = 0;
static int frufd = 0;
if ((opendevfru == 0) && (frufd == 0)) {
return (-1);
}
opendevfru = 1;
}
return (frufd);
}
/*
* Look up the container_hdl in the PICL tree.
*/
{
int err;
if (fru_open_dev() == -1) {
return (NULL);
}
if (err != PICL_SUCCESS) {
return (NULL);
}
&container_hdl, sizeof (container_hdl_t));
if (err != PICL_SUCCESS) {
return (NULL);
}
return (container_hdl);
}
/*
* Note : fru_open_container and fru_close_container do not map onto the opens
* and closes of the sgfru device on lw8. There is one sgfru device which
* handles all containers.
*/
/*ARGSUSED*/
int
{
if (fru_open_dev() == -1) {
return (-1);
}
return (0);
}
/*ARGSUSED*/
int
{
int fd;
return (-1);
}
numsections.cnt = 0;
return (-1);
}
return (numsections.cnt);
}
/*ARGSUSED*/
int
{
int fd;
return (-1);
}
return (-1);
}
}
/*ARGSUSED*/
int
{
int fd;
return (-1);
}
numsegments.cnt = 0;
return (-1);
}
return (numsegments.cnt);
}
/*ARGSUSED*/
int
{
int fd;
return (-1);
}
return (-1);
}
}
/*ARGSUSED*/
int
{
int fd;
/* check the effective uid of the client */
return (-1); /* not a root */
}
return (-1);
}
return (-1);
}
/*
* The new segment handle is returned in segment,
* return the updated section handle in newsection.
*/
return (0);
}
int
{
int fd;
/* check the effective uid of the client */
return (-1); /* not a root */
}
return (-1);
}
return (-1);
}
/* Return the updated section handle in newsection. */
return (0);
}
/*ARGSUSED*/
{
int fd;
return (-1);
}
return (-1);
}
}
/*ARGSUSED*/
{
int fd;
return (-1);
}
return (-1);
}
/* Return the updated segment handle in newsegment. */
}
/*ARGSUSED*/
int
{
int fd;
return (-1);
}
numpackets.cnt = 0;
return (-1);
}
return (numpackets.cnt);
}
/*ARGSUSED*/
int
{
int fd;
return (-1);
}
return (-1);
}
}
/*ARGSUSED*/
{
int fd;
return (-1);
}
return (-1);
}
}
int
{
int fd;
/* check the effective uid of the client */
return (-1); /* not a root */
}
return (-1);
}
return (-1);
}
/* Return the updated packet handle in newpacket. */
return (0);
}
int
{
int fd;
/* check the effective uid of the client */
return (-1); /* not a root */
}
return (-1);
}
return (-1);
}
/*
* The new packet handle is returned in packet,
* return the updated segment handle in newsegment.
*/
return (0);
}
int
{
int fd;
/* check the effective uid of the client */
return (-1); /* not a root */
}
return (-1);
}
return (-1);
}
/* Return the updated segment handle in newsegment. */
return (0);
}
/*
* Description :
* fru_is_data_available() checks to see if the frudata
* is available on a fru.
*
* Arguments :
* picl_nodehdl_t holds the picl node handle of the fru.
*
* Return :
* int
* return 1: if FRUID information is available
* return 0: if FRUID information is not present
*
*/
/* ARGSUSED */
int
{
return (0);
}