handle 64-bit time_t

32-bit architectures, like ARM, are moving away from using 32-bit
time syscalls in order to avoid the 2038 problem.  When compiled
with newer glibc, the timespec struct has 64-bit values.  Adjust
time calculation functions to use `time_t` instead of a basic int-type
so that the appropriate length type is used.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic1cb7f54a41b556f997349bd4dc52c6ba0e6064f
1 file changed
tree: 5e7733b6572dfd579fe1b565da1e7a4ee0d64a20
  1. linux/
  2. service_files/
  3. .clang-format
  4. .clang-format-ignore
  5. CMakeLists.txt
  6. dbus_raw_peci.cpp
  7. LICENSE
  8. meson.build
  9. meson_options.txt
  10. OWNERS
  11. peci.c
  12. peci.h
  13. peci.pc.in
  14. peci_cmds.c
  15. README.md
README.md

libpeci

libpeci is a library that provides various APIs to interface with the IOCTLs provided by the PECI driver in the OpenBMC kernel. Currently available here:

https://github.com/openbmc/linux/blob/dev-5.4/include/uapi/linux/peci-ioctl.h

peci_cmds

This repo also includes a peci_cmds command-line utility with functions that map to the libpeci APIs. It can be used to test PECI functionality across the library, driver, and hardware.

dbus_raw_peci

This repo also includes dbus_raw_peci which provides a raw-peci daemon that exposes a raw PECI interface that is accessible over D-Bus. It can be used when an application needs to send a raw PECI command without loading the full PECI library.