dbus-sdr: allow retrieving FRU ID zero
The getFru() function had been unconditionally translating attempts to
access FRU ID 0 to instead access FRU ID 1, making it impossible to
retrieve baseboard FRU information via IPMI:
$ ipmitool -C17 -I lanplus -U root -P 0penBmc -H $bmc fru print 0
Device not present (Requested sensor, data, or record not found)
By removing this substitution, IPMI clients can now access baseboard FRU
info.
Tested: 'ipmitool fru print 0' displays the expected baseboard FRU data.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I87b8c299f7bbf4f10bac25484e03cb6df97241a6
diff --git a/dbus-sdr/storagecommands.cpp b/dbus-sdr/storagecommands.cpp
index 8958c61..f8380fd 100644
--- a/dbus-sdr/storagecommands.cpp
+++ b/dbus-sdr/storagecommands.cpp
@@ -253,11 +253,6 @@
return ipmi::ccSuccess;
}
- // Set devId to 1 if devId is 0.
- // 0 is reserved for baseboard and set to 1 in recalculateHashes().
- if (!devId)
- devId = 1;
-
auto deviceFind = deviceHashes.find(devId);
if (deviceFind == deviceHashes.end())
{