summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0010-fix-get-system-GUID-ipmi-command.patch
blob: efee7cc2675921d157bd087a854fc8c9ebe97a43 (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
commit 72e6573f36fd3b9ce018e71b07bc1be63275d1f8
Author: Vernon Mauery <vernon.mauery@linux.intel.com>
Date:   Fri Jun 21 12:27:20 2019 -0700

    Fix 'Get System GUID' to use settings UUID
    
    The upstream Get System GUID command looks first for a BMC interface
    and then assumes that the UUID interface is next to that. But that is
    not the case on Intel systems where the system GUID is found in the
    settings daemon.
    
    Change-Id: I924bd05e0a546f2b30288c1faf72157296ab6579
    Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>

diff --git a/apphandler.cpp b/apphandler.cpp
index 280d0db..25af6bb 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -799,8 +799,6 @@ auto ipmiAppGetBtCapabilities()
 
 auto ipmiAppGetSystemGuid() -> ipmi::RspType<std::array<uint8_t, 16>>
 {
-    static constexpr auto bmcInterface =
-        "xyz.openbmc_project.Inventory.Item.Bmc";
     static constexpr auto uuidInterface = "xyz.openbmc_project.Common.UUID";
     static constexpr auto uuidProperty = "UUID";
 
@@ -809,7 +807,7 @@ auto ipmiAppGetSystemGuid() -> ipmi::RspType<std::array<uint8_t, 16>>
     {
         // Get the Inventory object implementing BMC interface
         auto busPtr = getSdBus();
-        auto objectInfo = ipmi::getDbusObject(*busPtr, bmcInterface);
+        auto objectInfo = ipmi::getDbusObject(*busPtr, uuidInterface);
 
         // Read UUID property value from bmcObject
         // UUID is in RFC4122 format Ex: 61a39523-78f2-11e5-9862-e6402cfc3223