summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0014-Enable-get-device-guid-ipmi-command.patch
blob: 46dd994665665bcfa1d23c5532afcb212d4ace02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 482a6cc52d0ec514d6da5f4bcb04b4991f3cc36e Mon Sep 17 00:00:00 2001
From: Yong Li <yong.b.li@linux.intel.com>
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 <yong.b.li@linux.intel.com>
---
 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<level::ERR>("Failed to call Get Method", entry("ERRNO=0x%X", -r));
-- 
2.7.4