Change primary postcode interface to byte array
Change primary code to std::vector<uint8_t> to meet the changes in
phosphor-dbus-interface.
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/74633
Change-Id: Ib5822973a1dbc6aa8c52f4e81b56091dc33b5f08
Signed-off-by: Cosmo Chou <cosmo.chou@quantatw.com>
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
diff --git a/ipmisnoop/ipmisnoop.cpp b/ipmisnoop/ipmisnoop.cpp
index 56d06d9..474fc34 100644
--- a/ipmisnoop/ipmisnoop.cpp
+++ b/ipmisnoop/ipmisnoop.cpp
@@ -113,12 +113,12 @@
if (posVal > minPositionVal && posVal < maxPositionVal)
{
- std::tuple<uint64_t, secondary_post_code_t> postcodes =
- reporters[posVal - 1]->value();
- uint64_t postcode = std::get<uint64_t>(postcodes);
+ std::tuple<primary_post_code_t, secondary_post_code_t>
+ postcodes = reporters[posVal - 1]->value();
+ auto postcode = std::get<0>(postcodes);
// write postcode into seven segment display
- if (postCodeDisplay(postcode) < 0)
+ if (postCodeDisplay(postcode[0]) < 0)
{
fprintf(stderr, "Error in display the postcode\n");
}