/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <errno.h>
#include "fru_tag.h"
char *
{
switch (e) {
case FRU_A:
return ("A");
case FRU_B:
return ("B");
case FRU_C:
return ("C");
case FRU_D:
return ("D");
case FRU_E:
return ("E");
case FRU_F:
return ("F");
case FRU_G:
return ("G");
case FRU_X:
return ("X");
}
return ("?");
}
{
switch (tag) {
case FRU_A:
return (1);
case FRU_B:
case FRU_C:
return (2);
case FRU_D:
case FRU_E:
return (3);
case FRU_F:
return (4);
case FRU_G:
return (6);
}
return (-1);
}
int
{
/* make sure the tag is clear. */
/* then fill it in with data. */
switch (type) {
case FRU_A:
return (-1);
}
break;
case FRU_B:
return (-1);
}
break;
case FRU_C:
return (-1);
}
break;
case FRU_D:
return (-1);
}
break;
case FRU_E:
return (-1);
}
break;
case FRU_F:
return (-1);
}
break;
case FRU_G:
return (-1);
}
break;
default:
return (-1);
}
return (get_tag_size(type));
}
#if defined(_LITTLE_ENDIAN)
{
return (FRU_A);
return (FRU_B);
return (FRU_C);
return (FRU_D);
return (FRU_E);
return (FRU_F);
return (FRU_G);
return (-1);
}
#else
{
return (FRU_A);
return (FRU_B);
return (FRU_C);
return (FRU_D);
return (FRU_E);
return (FRU_F);
return (FRU_G);
else
return (-1);
}
#endif /* _LITTLE_ENDIAN */
#if defined(_LITTLE_ENDIAN)
{
switch (get_tag_type(tag)) {
case FRU_A:
case FRU_B:
case FRU_C:
case FRU_D:
case FRU_E:
case FRU_F:
case FRU_G:
default:
return ((uint32_t)-1);
}
}
#else
{
switch (get_tag_type(tag)) {
case FRU_A:
case FRU_B:
case FRU_C:
case FRU_D:
case FRU_E:
case FRU_F:
case FRU_G:
default:
return ((uint32_t)-1);
}
}
#endif /* _LITTLE_ENDIAN */
#if defined(_LITTLE_ENDIAN)
{
switch (get_tag_type(tag)) {
case FRU_A:
case FRU_B:
case FRU_C:
case FRU_D:
case FRU_E:
case FRU_F:
case FRU_G:
default:
return ((uint32_t)-1);
}
}
#else
{
switch (get_tag_type(tag)) {
case FRU_A:
case FRU_B:
case FRU_C:
case FRU_D:
case FRU_E:
case FRU_F:
case FRU_G:
default:
return ((uint32_t)-1);
}
}
#endif /* _LITTLE_ENDIAN */
int
{
}