/*
* 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
*/
/*
*/
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include "fru_access_impl.h"
#include "libfruds.h"
#include "libfrup.h"
#include "fru_access.h"
#include "fruraw.h"
/* ARGSUSED */
static raw_list_t *
{
return (g_raw);
}
static container_hdl_t
{
return (-1);
}
}
static fru_errno_t
{
switch (err) {
case ENFILE:
case EEXIST:
return (FRU_DUPSEG);
case EAGAIN:
return (FRU_NOSPACE);
case EPERM:
return (FRU_INVALPERM);
default :
return (FRU_IOERROR);
}
}
static raw_list_t *
{
return (NULL);
}
return (NULL);
}
return (node);
}
/*
* Arguments :
* 0 - pointer to byte buffer (in)
* 1 - size of buffer (in)
* 2 - container type, string (in)
*/
static fru_errno_t
{
if (num != 3) {
return (FRU_FAILURE);
}
return (FRU_FAILURE);
}
return (FRU_FAILURE);
}
return (FRU_SUCCESS);
}
static fru_errno_t
frt_shutdown(void)
{
while (lptr) {
}
return (FRU_SUCCESS);
}
static fru_errno_t
{
return (FRU_SUCCESS);
}
/* ARGSUSED */
static fru_errno_t
{
return (FRU_NODENOTFOUND);
}
/* ARGSUSED */
static fru_errno_t
{
return (FRU_NODENOTFOUND);
}
/* ARGSUSED */
static fru_errno_t
{
return (FRU_NODENOTFOUND);
}
/* ARGSUSED */
static fru_errno_t
{
return (FRU_SUCCESS);
}
/* ARGSUSED */
static fru_errno_t
{
return (FRU_SUCCESS);
}
static fru_errno_t
{
int i = 0;
int acc_err = 0;
if (num_segment == -1) {
} else if (num_segment == 0) {
return (FRU_SUCCESS);
}
return (FRU_FAILURE);
}
if (acc_err == -1) {
}
for (i = 0; i < num_segment; i++) {
/* ensure NULL terminated. */
return (FRU_FAILURE);
}
}
return (FRU_SUCCESS);
}
static fru_errno_t
{
int acc_err = 0;
int i = 0;
int num_section = 0;
if (num_section == -1) {
}
return (FRU_FAILURE);
}
if (acc_err == -1) {
}
for (i = 0; i < num_section; i++) {
!= FRU_SUCCESS) {
return (err);
}
}
return (FRU_SUCCESS);
}
static fru_errno_t
{
int j = 0;
int acc_err = 0;
if (num_seg == -1) {
return (FRU_FAILURE);
}
return (FRU_FAILURE);
}
if (acc_err == -1) {
}
for (j = 0; j < num_seg; j++) {
/* NULL terminate */
return (FRU_SUCCESS);
}
}
return (FRU_INVALSEG);
}
static fru_errno_t
{
int i = 0;
int acc_err = 0;
int num_sect;
if (num_sect == -1) {
}
return (FRU_FAILURE);
}
if (acc_err == -1) {
}
for (i = 0; i < num_sect; i++) {
== FRU_SUCCESS) {
return (FRU_SUCCESS);
}
}
return (FRU_INVALSEG);
}
static fru_errno_t
{
int prot_flg = 0;
!= FRU_SUCCESS) {
return (err);
}
if (prot_flg == 0)
else
return (FRU_SUCCESS);
}
/* ARGSUSED */
static fru_errno_t
{
/* NOT SUPPORTED */
return (FRU_NOTSUP);
}
/* ARGSUSED */
static fru_errno_t
{
/* NOT SUPPORTED */
return (FRU_NOTSUP);
}
/* ARGSUSED */
static fru_errno_t
{
int num_segment;
int cnt;
int num_sect;
int each_seg;
int acc_err;
int status;
if (num_sect == -1) {
}
return (FRU_FAILURE);
}
if (num_sect == -1) {
}
if (num_segment == -1) {
} else if (num_segment == 0) {
continue;
}
return (FRU_FAILURE);
}
num_segment, NULL);
if (acc_err == -1) {
}
} else {
}
!= FRU_SUCCESS) {
return (status);
}
}
}
return (FRU_SUCCESS);
}
static fru_errno_t
{
int num_sect;
int acc_err;
int cnt;
int num_segment;
int each_seg;
if (num_sect == -1) {
}
return (FRU_FAILURE);
}
if (acc_err == -1) {
}
if (num_segment == -1) {
} else if (num_segment == 0) {
continue;
}
return (FRU_FAILURE);
}
num_segment, NULL);
if (acc_err == -1) {
}
return (FRU_SUCCESS);
}
}
}
return (FRU_FAILURE);
}
/* ARGSUSED */
static fru_errno_t
{
/* NOT SUPPORTED */
return (FRU_NOTSUP);
}
/* ARGSUSED */
static fru_errno_t
{
/* NOT SUPPORTED */
return (FRU_NOTSUP);
}
/* ARGSUSED */
static fru_errno_t
{
/* NOT SUPPORTED */
return (FRU_NOTSUP);
}
/* ARGSUSED */
static fru_errno_t
{
/* NOT SUPPORTED */
return (FRU_NOTSUP);
}
/* ARGSUSED */
static fru_errno_t
int instance)
{
/* NOT SUPPORTED */
return (FRU_NOTSUP);
}
static fru_errno_t
{
int rc_num;
int status;
char *rc_tags;
char *rc_data;
int i;
/* num of packet */
if (rc_num == -1) {
} else if (rc_num == 0) {
return (FRU_SUCCESS);
}
while (tmp_list) {
break;
}
}
if (tmp_list) {
return (FRU_SUCCESS);
}
return (FRU_SUCCESS);
}
}
return (FRU_FAILURE);
}
/* get all packets */
}
return (FRU_FAILURE);
}
/* number of tags */
for (i = 0; i < rc_num; i++) {
return (FRU_FAILURE);
}
/* get the payload data */
if (tmp_list) {
!= FRU_SUCCESS)) {
return (status);
}
}
/* print packet */
return (status);
}
}
return (FRU_SUCCESS);
}
/* object for libfru to link to */
{
};