Hi,

"ipmitool sel list" list the events in hexadecimal but ipmitool sel delete does not parse hexadecimal so one has to do the conversion of the event id to its decimal value manually before invoking "ipmitool sel delete".

"ipmitool sel delete" command should be able to parse hexadecimal values to match the output of "ipmitool sel list".

The (very simple) patch attached adds this functionality.

Cheers,
Olivier
--- ipmitool-1.8.9/lib/ipmi_sel.c       2008-07-19 01:32:49.000000000 +0100
+++ ipmitool-1.8.9-parsehexa/lib/ipmi_sel.c     2008-07-20 01:27:29.000000000 
+0100
@@ -31,6 +31,7 @@
  */
 
 #include <string.h>
+#include <stdlib.h> /* for strtoul, to parse hexadecimal values  */
 #include <math.h>
 #define __USE_XOPEN /* glibc2 needs this for strptime */
 #include <time.h>
@@ -1776,7 +1777,7 @@
 
        for (; argc != 0; argc--)
        {
-               id = atoi(argv[argc-1]);
+               id = (uint16_t) strtoul(argv[argc-1], NULL, 0);
                msg_data[2] = id & 0xff;
                msg_data[3] = id >> 8;
 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to