/*
* 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 <string.h>
#include <strings.h>
#include <scsi/libses_plugin.h>
#pragma pack(1)
typedef struct ses_riverwalk_stringin {
#pragma pack()
/*ARGSUSED*/
static int
{
int nverr;
return (0);
/*
* Find the containing enclosure node and extract the STRING IN
* information.
*/
;
return (0);
if (len < sizeof (ses_riverwalk_stringin_t))
return (0);
switch (ses_node_type(np)) {
case SES_NODE_ELEMENT:
/*
* We can get part and serial information for power supplies and
* the SIM cards (ESC_ELECTRONICS elements).
*/
&type) == 0);
&index) == 0);
switch (type) {
case SES_ET_POWER_SUPPLY:
switch (index) {
case 0:
break;
break;
case 1:
break;
break;
}
break;
case SES_ET_ESC_ELECTRONICS:
switch (index) {
case 0:
break;
break;
case 1:
break;
break;
}
break;
case SES_ET_COOLING:
/*
* The J4200 uses identical STRING IN data except that
* the PSU part numbers are replaced with fan part
* numbers. The power supply part and serial number
* information are not available.
*/
switch (index) {
case 0:
break;
break;
case 1:
break;
break;
}
break;
}
return (0);
if (pn[0] != '\0') {
buf);
}
if (sn[0] != '\0') {
sn);
}
break;
case SES_NODE_ENCLOSURE:
/*
* The chassis serial number is derived from the MID FRU
* descriptor.
*/
sizeof (strp->rws_mid_sn));
buf);
}
break;
}
return (0);
}
int
{
};
&config) != 0);
}