The hpipower client program does not work all the plug-ins.
 
The hpipower considers the resources of entity type SAHPI_ENT_SBC_BLADE.
Instead it should look for the resources with power capability 
(SAHPI_CAPABILITY_POWER).
The resources of can be any entity type but it should have power capability.
 
Also, it crashes if wrong blade number is supplied.
 
The fix for these problems are given as patch for openhpi-2.10.0
=================================Cut Here============================
--- openhpi-2.10.0/clients/hpipower.c
+++ openhpi-2.10.0/clients/hpipower.c
@@ -198,8 +198,7 @@
                 // Blades will have the first Element of the Entity Path set 
to SBC_BLADE
                 EntityElement = 0;
                 HPI_POWER_DEBUG_PRINT(".");
-                if (Report.ResourceEntity.Entry[EntityElement].EntityType ==
-                    SAHPI_ENT_SBC_BLADE)
+                if (Report.ResourceCapabilities & SAHPI_CAPABILITY_POWER)
                 {
                         HPI_POWER_DEBUG_PRINT("#");
                         // We have found a Blade
@@ -305,6 +304,11 @@
                 HPI_POWER_DEBUG_PRINT("5.0 Executing the command\n\r");
                 // obtain the information for this computer
                 ComputerPtr = g_slist_nth_data(ComputerListHead, 
SelectedSystem);
+                if (ComputerPtr == NULL)
+                {
+                        printf("Call returned a NULL\n");
+                        return -1;
+                }
 
                 if (Action <= SAHPI_POWER_CYCLE)
                 {
=================================Cut Here============================
 
Regards,
Raghavendra

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel

Reply via email to