From: Jean-Michel A. <au...@us...> - 2007-07-11 15:36:53
|
Update of /cvsroot/ipmitool/ipmitool/include/ipmitool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv2854/include/ipmitool Modified Files: ipmi_sdr.h Added Files: ipmi_sdradd.h Log Message: Hello, Patch submitted by Benoit Guillon [gu...@th...] The patch allows you to fill the SDR repository of a BMC with the built-in sensor SDRs of the BMC and of the sensors of the satellite FRUs. - adding new (partial) SDRs - clearing the SDR repository (ok, it can be dangerous) - adding SDRs from a dumped file. Re.: ipmitool sdr fill sensors ipmitool sdr fill file <filename> --- NEW FILE: ipmi_sdradd.h --- /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistribution of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistribution in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Sun Microsystems, Inc. or the names of * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. * SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING * OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL * SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, * OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ #ifndef IPMI_SDRADD_H #define IPMI_SDRADD_H /* * Methods to add SDRs to repository from built-in sensors or files */ int ipmi_sdr_add_from_sensors(struct ipmi_intf *intf, int maxslot); int ipmi_sdr_add_from_file(struct ipmi_intf *intf, const char *ifile); #endif /* IPMI_SDRADD_H */ Index: ipmi_sdr.h =================================================================== RCS file: /cvsroot/ipmitool/ipmitool/include/ipmitool/ipmi_sdr.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** ipmi_sdr.h 3 Nov 2006 19:44:51 -0000 1.38 --- ipmi_sdr.h 11 Jul 2007 14:27:45 -0000 1.39 *************** *** 727,730 **** --- 727,731 ---- int total; int next; + int use_built_in; }; *************** *** 792,796 **** "Version Change","FRU State" }; ! struct ipmi_sdr_iterator *ipmi_sdr_start(struct ipmi_intf *intf); struct sdr_get_rs *ipmi_sdr_get_next_header(struct ipmi_intf *intf, struct ipmi_sdr_iterator *i); --- 793,798 ---- "Version Change","FRU State" }; ! struct ipmi_sdr_iterator *ipmi_sdr_start(struct ipmi_intf *intf, ! int use_builtin); struct sdr_get_rs *ipmi_sdr_get_next_header(struct ipmi_intf *intf, struct ipmi_sdr_iterator *i); *************** *** 825,829 **** uint8_t sensor); const char *ipmi_sdr_get_sensor_type_desc(const uint8_t type); ! int ipmi_sdr_get_reservation(struct ipmi_intf *intf, uint16_t * reserve_id); int ipmi_sdr_print_sensor_full(struct ipmi_intf *intf, --- 827,832 ---- uint8_t sensor); const char *ipmi_sdr_get_sensor_type_desc(const uint8_t type); ! int ipmi_sdr_get_reservation(struct ipmi_intf *intf, int use_builtin, ! uint16_t * reserve_id); int ipmi_sdr_print_sensor_full(struct ipmi_intf *intf, |