IPMI command macros for SEL are defind both in
ipmi_constants.h and in ipmi_sel.h, with slightly
different names (IPMI_ prefix in the former, and
IPMI_CMD_ prefix in the latter). For uniformity
with other code, remove the SEL-related command
macros from ipmi_constants.h, use the IPMI_CMD_
ones from ipmi_sel.h
Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
Get rid of an excessive `strcmp()` call
Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
When a SEL command gets an invalid data length
in the response from the remote device, clearly
state that's it's an invalid _response_ length,
not some other data length. Remove ambiguity.
Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
When `now` was specified for `sel time set`, `ipmitool`
would subtract a local timezone from the UTC time,
resulting in incorrect time setting.
Also remove setting of `daylight` global variable
that is not present on FreeBSD. This didn't change
anything anyway, see the discussion in
#43
Resolves: #43
Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
IPMI 2.0 defines a pair of commands (Get/Set SEL Time UTC Offset)
that allow for learning from the remote BMC what timezone it
is in and setting that timezone back when setting the SEL time.
Previously, `ipmitool` treated BMC time as strictly
UTC which, although usually true, wasn't in accordance
with the IPMI specification that says that BMC SEL time
is local. Since there was is way for `ipmitool` to know
what "local" is for the BMC with IPMI prior to 2.0, or
when the 'Get SEL Time UTC Offset' command is not supported,
`iptmitool` will still treat the remote SEL time as UTC
when the BMC reports `unspecified` for SEL Time UTC Offset,
or when the relevant command fails otherwise.
Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>