libpldm : Fix ver32 encoding declaration
This commit would attempt to fix the wrongly captured
ver32 structure declaration in libpldm & impacted test
cases.
Resolves : https://github.com/openbmc/pldm/issues/27
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I9dccd4377bb1ef0e7738527ff154fd75f6277f39
diff --git a/libpldmresponder/base.cpp b/libpldmresponder/base.cpp
index 572f8f1..4c5b757 100644
--- a/libpldmresponder/base.cpp
+++ b/libpldmresponder/base.cpp
@@ -60,12 +60,12 @@
};
static const std::map<Type, ver32_t> versions{
- {PLDM_BASE, {0xF1, 0xF0, 0xF0, 0x00}},
- {PLDM_PLATFORM, {0xF1, 0xF2, 0xF0, 0x00}},
- {PLDM_BIOS, {0xF1, 0xF0, 0xF0, 0x00}},
- {PLDM_FRU, {0xF1, 0xF0, 0xF0, 0x00}},
+ {PLDM_BASE, {0x00, 0xf0, 0xf0, 0xf1}},
+ {PLDM_PLATFORM, {0x00, 0xf0, 0xf2, 0xf1}},
+ {PLDM_BIOS, {0x00, 0xf0, 0xf0, 0xf1}},
+ {PLDM_FRU, {0x00, 0xf0, 0xf0, 0xf1}},
#ifdef OEM_IBM
- {PLDM_OEM, {0xF1, 0xF0, 0xF0, 0x00}},
+ {PLDM_OEM, {0x00, 0xf0, 0xf0, 0xf1}},
#endif
};
diff --git a/libpldmresponder/test/libpldmresponder_base_test.cpp b/libpldmresponder/test/libpldmresponder_base_test.cpp
index 9be09ff..3ef8006 100644
--- a/libpldmresponder/test/libpldmresponder_base_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_base_test.cpp
@@ -84,7 +84,7 @@
uint32_t transferHandle = 0x0;
uint8_t flag = PLDM_GET_FIRSTPART;
uint8_t retFlag = PLDM_START_AND_END;
- ver32_t version = {0xF1, 0xF0, 0xF0, 0x00};
+ ver32_t version = {0x00, 0xF0, 0xF0, 0xF1};
auto rc =
encode_get_version_req(0, transferHandle, flag, pldmType, request);