host reset recovery: use PDI constants
Use PDI constants where applicable.
Tested: Inspection only.
Change-Id: I1a6eaa5a71ac74767ed9c364345a527e41a02a23
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/host_reset_recovery.cpp b/host_reset_recovery.cpp
index 3040ebf..6faf77e 100644
--- a/host_reset_recovery.cpp
+++ b/host_reset_recovery.cpp
@@ -33,7 +33,6 @@
constexpr auto HOST_STATE_SVC = "xyz.openbmc_project.State.Host";
constexpr auto HOST_STATE_PATH = "/xyz/openbmc_project/state/host0";
constexpr auto PROPERTY_INTERFACE = "org.freedesktop.DBus.Properties";
-constexpr auto BOOT_PROGRESS_PROP = "BootProgress";
constexpr auto SYSTEMD_SERVICE = "org.freedesktop.systemd1";
constexpr auto SYSTEMD_OBJ_PATH = "/org/freedesktop/systemd1";
@@ -48,7 +47,8 @@
auto method = bus.new_method_call(HOST_STATE_SVC, HOST_STATE_PATH,
PROPERTY_INTERFACE, "Get");
- method.append(BootProgress::interface, BOOT_PROGRESS_PROP);
+ method.append(BootProgress::interface,
+ BootProgress::property_names::boot_progress);
auto response = bus.call(method);
@@ -87,9 +87,9 @@
static constexpr auto errorMessage =
"xyz.openbmc_project.State.Error.HostNotRunning";
- auto method = bus.new_method_call(LoggingCreate::default_service,
- LoggingCreate::instance_path,
- LoggingCreate::interface, "Create");
+ auto method = bus.new_method_call(
+ LoggingCreate::default_service, LoggingCreate::instance_path,
+ LoggingCreate::interface, LoggingCreate::method_names::create);
method.append(errorMessage, LoggingEntry::Level::Error, additionalData);
auto resp = bus.call(method);
}