From 482a6cc52d0ec514d6da5f4bcb04b4991f3cc36e Mon Sep 17 00:00:00 2001 From: Yong Li Date: Mon, 17 Sep 2018 13:41:25 +0800 Subject: [PATCH] Enable get device guid ipmi command The UUID interface is changed, modify the API to get the correct UUID for device guid Change-Id: I0c0c7bd350992ac03f928707986a7180407d8f3f Signed-off-by: Yong Li --- apphandler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apphandler.cpp b/apphandler.cpp index 937be71..89d797a 100644 --- a/apphandler.cpp +++ b/apphandler.cpp @@ -392,9 +392,10 @@ ipmi_ret_t ipmi_app_get_device_guid(ipmi_netfn_t netfn, ipmi_cmd_t cmd, ipmi_data_len_t data_len, ipmi_context_t context) { - const char* objname = "/xyz/openbmc_project/Chassis/Control/Chassis"; + const char* objname = + "/xyz/openbmc_project/inventory/system/chassis/motherboard/bmc"; const char* iface = "org.freedesktop.DBus.Properties"; - const char* chassis_iface = "xyz.openbmc_project.Chassis.Control.Chassis"; + const char* uuid_iface = "xyz.openbmc_project.Common.UUID"; sd_bus_message* reply = NULL; sd_bus_error error = SD_BUS_ERROR_NULL; int r = 0; @@ -426,8 +427,9 @@ ipmi_ret_t ipmi_app_get_device_guid(ipmi_netfn_t netfn, ipmi_cmd_t cmd, entry("ERRNO=0x%X", -r)); goto finish; } + r = sd_bus_call_method(bus, busname, objname, iface, "Get", &error, &reply, - "ss", chassis_iface, "uuid"); + "ss", uuid_iface, "UUID"); if (r < 0) { log("Failed to call Get Method", entry("ERRNO=0x%X", -r)); -- 2.7.4