commit | 8c1376cae73da401d40e1c7f07e6f830bd544a21 | [log] [tgz] |
---|---|---|
author | Chau Ly <chaul@amperecomputing.com> | Fri Jan 05 07:22:10 2024 +0000 |
committer | ChauLy-Vietnam <chaul@amperecomputing.com> | Mon Mar 17 03:33:36 2025 +0000 |
tree | f8fd81b6e04640d28bcd5114a50bff214860a5e7 | |
parent | c84add583a4989f2c1f4b950a0a204111afd3723 [diff] |
chassishandler: Interpret intrusion sensor values Chassis Intrusion Sensor value on D-Bus was updated with new format that adapts PDI enum definition [1]. This patch modifies how the value from D-Bus be interpreted to adapt with the change from D-Bus. This commit uses GetSubTree to look for all object paths that implement the Chassis Intrusion interface, instead of using hardcoded path. phosphor-dbus-interfaces class is used to ensure consistency. When more than one path is returned from GetSubTree. If all the Status values are Normal, the final result is inactive. If one of the Status value is not Normal, the final result is active. If no Status value can be read from D-Bus, the final result is inactive. [1]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Chassis/Intrusion.interface.yaml#L30 Tested: If value on D-Bus is: "xyz.openbmc_project.Chassis.Intrusion.Status.Normal" $ ipmitool chassis status | grep -i intrusion Chassis Intrusion: inactive Otherwise, Chassis Intrusion: active Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: I3bf7d6c8db9d8537cde10a8e8b20d325b86a9c73
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in ipmid/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage