ipmi_misc.c revision e1a24155fa4a9f69c2b1a6759fbe0180645724f0
/*
* 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 <stdio.h>
#include <string.h>
#include "ipmi_impl.h"
{
return (ihp->ih_deviceid);
return (NULL);
return (NULL);
}
/*
* The devid response data may include additional data beyond the end of
* the normal structure, so we copy the entire response.
*/
return (NULL);
sizeof (id_prod));
return (ihp->ih_deviceid);
}
/*
* Returns the firmware revision as a string. This does the work of converting
* the deviceid data into a human readable string (decoding the BCD values).
* It also encodes the fact that Sun ILOM includes the additional micro revision
* at the end of the deviceid information.
*/
const char *
{
char rev[128];
int i;
return (ihp->ih_firmware_rev);
return (NULL);
/*
* Start with the major an minor revision numbers
*/
if (ipmi_is_sun_ilom(dp) &&
/*
* With Sun ILOM we have the micro revision at the end of the
* deviceid. The first two bytes of the aux revision field are
* the platform version and release version.
*/
for (i = 0; i < 2; i++) {
if (auxrev[i] == 0)
continue;
auxrev[i]);
}
}
return (NULL);
return (ihp->ih_firmware_rev);
}