/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <libipmi.h>
#include <string.h>
#include "ipmi_impl.h"
/*
* Extracts bits between index h (high, inclusive) and l (low, exclusive) from
* u, which must be an unsigned integer.
*/
typedef struct ipmi_fru_read
{
/*
* returns: size of FRU inventory data in bytes, on success
* -1, otherwise
*/
int
{
char *tmp;
/*
* First we issue a command to retrieve the size of the specified FRU's
* inventory area
*/
return (-1);
return (-1);
}
return (-1);
}
else
return (-1);
}
NULL);
return (-1);
}
}
return (sz);
}
int
{
char *tmp;
/*
* We get the offset to the product info area from the FRU common
* header which is at the start of the FRU inventory area.
*
* The product info area is optional, so if the offset is NULL,
* indicating that it doesn't exist, then we return an error.
*/
if (!fru_hdr.ifh_product_info_off) {
return (-1);
}
return (0);
}
/*
* The Board Info area is described in Sect 11 of the IPMI Platform Management
* FRU Information Storage Definition (v1.1).
*/
int
{
char *tmp;
/*
* We get the offset to the board info area from the FRU common
* header which is at the start of the FRU inventory area.
*
* The board info area is optional, so if the offset is NULL,
* indicating that it doesn't exist, then we return an error.
*/
if (!fru_hdr.ifh_board_info_off) {
return (-1);
}
tmp += 3;
return (0);
}