Populate Protocol property in Item.Drive interface
By populating this property, bmcweb can populate the "Protocol"
property in the Drive schema.
Tested:
$ busctl get-property xyz.openbmc_project.eStoraged \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Drive Protocol
s "xyz.openbmc_project.Inventory.Item.Drive.DriveProtocol.eMMC"
Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: I2bd19190c445ce57f3d867ffbb437c1a4a370b51
diff --git a/include/util.hpp b/include/util.hpp
index 7cc778a..e1050ed 100644
--- a/include/util.hpp
+++ b/include/util.hpp
@@ -19,15 +19,17 @@
uint64_t eraseMaxGeometry;
uint64_t eraseMinGeometry;
std::string driveType;
+ std::string driveProtocol;
DeviceInfo(std::filesystem::path& deviceFile,
std::filesystem::path& sysfsDir, std::string& luksName,
std::string& locationCode, uint64_t eraseMaxGeometry,
- uint64_t eraseMinGeometry, std::string& driveType) :
+ uint64_t eraseMinGeometry, std::string& driveType,
+ std::string& driveProtocol) :
deviceFile(deviceFile),
sysfsDir(sysfsDir), luksName(luksName), locationCode(locationCode),
eraseMaxGeometry(eraseMaxGeometry), eraseMinGeometry(eraseMinGeometry),
- driveType(driveType)
+ driveType(driveType), driveProtocol(driveProtocol)
{}
};