[PATCH phosphor-host-ipmid v3] Add get sel time cmd
Patrick Williams
patrick at stwcx.xyz
Wed Oct 28 05:50:22 AEDT 2015
On Fri, Oct 23, 2015 at 05:39:52PM -0500, OpenBMC Patches wrote:
> From: Adriana Kobylak <anoo at us.ibm.com>
>
> Add support for IPMI function Get SEL Time
> ---
> storagehandler.C | 75 ++++++++++++++++++++++++++++++++++++++------------------
> storagehandler.h | 5 ++--
> 2 files changed, 54 insertions(+), 26 deletions(-)
>
> diff --git a/storagehandler.C b/storagehandler.C
> index 659fff5..cccfa56 100644
> --- a/storagehandler.C
> +++ b/storagehandler.C
> @@ -3,6 +3,8 @@
> +ipmi_ret_t ipmi_storage_get_sel_time(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
> + ipmi_request_t request, ipmi_response_t response,
> + ipmi_data_len_t data_len, ipmi_context_t context)
> +{
> + time_t currtime;
> + ipmi_ret_t rc = IPMI_CC_OK;
> +
> + // Get current time in seconds since jan 1 1970
> + time(&currtime);
> + uint32_t resp = (uint32_t)currtime;
> + resp = htonl(resp);
This should be 'htole32(resp)'. htonl puts in big-endian format, but
IPMI spec states little-endian.
--
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20151027/50af87c3/attachment.sig>
More information about the openbmc
mailing list