summaryrefslogtreecommitdiffstats
path: root/host-ipmid
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2018-09-10 14:12:16 -0700
committerJason M. Bills <jason.m.bills@linux.intel.com>2018-10-05 12:51:24 -0700
commit13e67c8d43064d58fb8c4cc7757abb823e3ac51e (patch)
tree7968046289cc1e2b87dd69c423efa291d257e39d /host-ipmid
parent1cd85963972719312a0017b59e29d90e1baa4ce5 (diff)
downloadphosphor-host-ipmid-13e67c8d43064d58fb8c4cc7757abb823e3ac51e.tar.gz
phosphor-host-ipmid-13e67c8d43064d58fb8c4cc7757abb823e3ac51e.zip
Fix IPMI SEL reservations and cancellations
Per the IPMI Spec, the SEL must be reserved to Delete an entry Clear the SEL Get a partial entry Add a partial entry The current SEL reservation must be cancelled when A SEL entry is added A SEL entry is deleted The SEL is cleared The device is reset A new reservation is requested This change adds a reservation status to track when a reservation is active and a method to cancel the current reservation, and it uses that to cancel the reservation in the Delete, Clear, and Add SEL methods. Change-Id: Ifd72e6d06ecc622855bd9ce8cc3928cbd0f2c34b Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'host-ipmid')
-rw-r--r--host-ipmid/ipmid-api.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/host-ipmid/ipmid-api.h b/host-ipmid/ipmid-api.h
index 820776a..e77e720 100644
--- a/host-ipmid/ipmid-api.h
+++ b/host-ipmid/ipmid-api.h
@@ -1,5 +1,6 @@
#ifndef __HOST_IPMID_IPMI_COMMON_H__
#define __HOST_IPMID_IPMI_COMMON_H__
+#include <stdbool.h>
#include <stdlib.h>
#include <systemd/sd-bus.h>
@@ -77,7 +78,9 @@ typedef ipmi_ret_t (*ipmid_callback_t)(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
void ipmi_register_callback(ipmi_netfn_t, ipmi_cmd_t, ipmi_context_t,
ipmid_callback_t, ipmi_cmd_privilege_t);
-unsigned short get_sel_reserve_id(void);
+unsigned short reserveSel(void);
+bool checkSELReservation(unsigned short id);
+void cancelSELReservation(void);
// These are the command network functions, the response
// network functions are the function + 1. So to determine
OpenPOWER on IntegriCloud