dsp: bios_table: Rename pldm_bios_table_attr_value_entry_encode_integer_check()
Introduce pldm_bios_table_attr_value_entry_encode_integer(), deprecate
pldm_bios_table_attr_value_entry_encode_integer_check(), add rename
configuration and apply it.
gitlint-ignore: T1
Change-Id: I7832752518592e69f8d64ac57d2724345b096729
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d7da18a..fcbe424 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -54,6 +54,7 @@
- `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
- `pldm_bios_table_attr_entry_string_encode_check()`
- `pldm_bios_table_attr_value_entry_encode_enum_check()`
+ - `pldm_bios_table_attr_value_entry_encode_integer_check()`
- `pldm_bios_table_attr_value_entry_encode_string_check()`
- `pldm_bios_table_string_entry_decode_string_check()`
- `pldm_bios_table_string_entry_encode_check()`
diff --git a/abi/x86_64/gcc.dump b/abi/x86_64/gcc.dump
index efb6f69..bdb14c6 100644
--- a/abi/x86_64/gcc.dump
+++ b/abi/x86_64/gcc.dump
@@ -1598,7 +1598,7 @@
},
'17275' => {
'Header' => 'bios_table.h',
- 'Line' => '663',
+ 'Line' => '668',
'Param' => {
'0' => {
'name' => 'table',
@@ -1618,7 +1618,7 @@
},
'17420' => {
'Header' => 'bios_table.h',
- 'Line' => '654',
+ 'Line' => '659',
'Param' => {
'0' => {
'name' => 'src_table',
@@ -1654,7 +1654,7 @@
},
'18108' => {
'Header' => 'bios_table.h',
- 'Line' => '620',
+ 'Line' => '625',
'Param' => {
'0' => {
'name' => 'table',
@@ -1847,7 +1847,7 @@
},
'20598' => {
'Header' => 'bios_table.h',
- 'Line' => '639',
+ 'Line' => '644',
'Param' => {
'0' => {
'name' => 'table',
@@ -1872,7 +1872,7 @@
},
'20898' => {
'Header' => 'bios_table.h',
- 'Line' => '627',
+ 'Line' => '632',
'Param' => {
'0' => {
'name' => 'size_without_pad',
@@ -1884,7 +1884,7 @@
},
'21253' => {
'Header' => 'bios_table.h',
- 'Line' => '602',
+ 'Line' => '607',
'Param' => {
'0' => {
'name' => 'entry',
@@ -1899,7 +1899,7 @@
},
'21302' => {
'Header' => 'bios_table.h',
- 'Line' => '609',
+ 'Line' => '614',
'Param' => {
'0' => {
'name' => 'entry',
@@ -1957,7 +1957,7 @@
'4' => 'r8'
},
'Return' => '100',
- 'ShortName' => 'pldm_bios_table_attr_value_entry_encode_integer_check'
+ 'ShortName' => 'pldm_bios_table_attr_value_entry_encode_integer'
},
'22195' => {
'Header' => 'bios_table.h',
@@ -9491,6 +9491,7 @@
'pldm_bios_table_attr_value_entry_encode_enum' => 1,
'pldm_bios_table_attr_value_entry_encode_enum_check' => 1,
'pldm_bios_table_attr_value_entry_encode_enum_length' => 1,
+ 'pldm_bios_table_attr_value_entry_encode_integer' => 1,
'pldm_bios_table_attr_value_entry_encode_integer_check' => 1,
'pldm_bios_table_attr_value_entry_encode_integer_length' => 1,
'pldm_bios_table_attr_value_entry_encode_string' => 1,
diff --git a/evolutions/current/pldm_bios_table_attr_value_entry_encode_integer_check.yaml b/evolutions/current/pldm_bios_table_attr_value_entry_encode_integer_check.yaml
new file mode 100644
index 0000000..06c9bff
--- /dev/null
+++ b/evolutions/current/pldm_bios_table_attr_value_entry_encode_integer_check.yaml
@@ -0,0 +1,2 @@
+- QualifiedName: pldm_bios_table_attr_value_entry_encode_integer_check
+ NewName: pldm_bios_table_attr_value_entry_encode_integer
diff --git a/include/libpldm/bios_table.h b/include/libpldm/bios_table.h
index 140b2b8..e11e0e6 100644
--- a/include/libpldm/bios_table.h
+++ b/include/libpldm/bios_table.h
@@ -589,6 +589,11 @@
* PLDM_BIOS_INTEGER. PLDM_ERROR_INVALID_LENGTH if entry_length lacks capacity to encode cv
* in entry.
*/
+int pldm_bios_table_attr_value_entry_encode_integer(void *entry,
+ size_t entry_length,
+ uint16_t attr_handle,
+ uint8_t attr_type,
+ uint64_t cv);
int pldm_bios_table_attr_value_entry_encode_integer_check(void *entry,
size_t entry_length,
uint16_t attr_handle,
diff --git a/meson.build b/meson.build
index 3c44229..76c1262 100644
--- a/meson.build
+++ b/meson.build
@@ -42,6 +42,7 @@
['pldm_bios_table_attr_entry_string_decode_def_string_length_check', 'pldm_bios_table_attr_entry_string_decode_def_string_length'],
['pldm_bios_table_attr_entry_string_encode_check', 'pldm_bios_table_attr_entry_string_encode'],
['pldm_bios_table_attr_value_entry_encode_enum_check', 'pldm_bios_table_attr_value_entry_encode_enum'],
+ ['pldm_bios_table_attr_value_entry_encode_integer_check', 'pldm_bios_table_attr_value_entry_encode_integer'],
['pldm_bios_table_attr_value_entry_encode_string_check', 'pldm_bios_table_attr_value_entry_encode_string'],
['pldm_bios_table_string_entry_decode_string_check', 'pldm_bios_table_string_entry_decode_string'],
['pldm_bios_table_string_entry_encode_check', 'pldm_bios_table_string_entry_encode'],
diff --git a/src/dsp/bios_table.c b/src/dsp/bios_table.c
index 71c6eca..844753e 100644
--- a/src/dsp/bios_table.c
+++ b/src/dsp/bios_table.c
@@ -798,11 +798,11 @@
}
LIBPLDM_ABI_STABLE
-int pldm_bios_table_attr_value_entry_encode_integer_check(void *entry,
- size_t entry_length,
- uint16_t attr_handle,
- uint8_t attr_type,
- uint64_t cv)
+int pldm_bios_table_attr_value_entry_encode_integer(void *entry,
+ size_t entry_length,
+ uint16_t attr_handle,
+ uint8_t attr_type,
+ uint64_t cv)
{
POINTER_CHECK(entry);
size_t length =
diff --git a/tests/dsp/bios_table.cpp b/tests/dsp/bios_table.cpp
index 8d915c4..8314f40 100644
--- a/tests/dsp/bios_table.cpp
+++ b/tests/dsp/bios_table.cpp
@@ -729,33 +729,33 @@
EXPECT_EQ(length, integerEntry.size());
std::vector<uint8_t> encodeEntry(length, 0);
ASSERT_EQ(
- pldm_bios_table_attr_value_entry_encode_integer_check(
+ pldm_bios_table_attr_value_entry_encode_integer(
encodeEntry.data(), encodeEntry.size(), 0, PLDM_BIOS_INTEGER, 10),
PLDM_SUCCESS);
EXPECT_EQ(encodeEntry, integerEntry);
- EXPECT_NE(pldm_bios_table_attr_value_entry_encode_integer_check(
+ EXPECT_NE(pldm_bios_table_attr_value_entry_encode_integer(
encodeEntry.data(), encodeEntry.size() - 1, 0,
PLDM_BIOS_INTEGER, 10),
PLDM_SUCCESS);
- auto rc = pldm_bios_table_attr_value_entry_encode_integer_check(
+ auto rc = pldm_bios_table_attr_value_entry_encode_integer(
encodeEntry.data(), encodeEntry.size(), 0, PLDM_BIOS_INTEGER, 10);
EXPECT_EQ(rc, PLDM_SUCCESS);
EXPECT_EQ(encodeEntry, integerEntry);
auto entry = reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(
integerEntry.data());
entry->attr_type = PLDM_BIOS_INTEGER_READ_ONLY;
- rc = pldm_bios_table_attr_value_entry_encode_integer_check(
+ rc = pldm_bios_table_attr_value_entry_encode_integer(
encodeEntry.data(), encodeEntry.size(), 0, PLDM_BIOS_INTEGER_READ_ONLY,
10);
EXPECT_EQ(rc, PLDM_SUCCESS);
EXPECT_EQ(encodeEntry, integerEntry);
- rc = pldm_bios_table_attr_value_entry_encode_integer_check(
+ rc = pldm_bios_table_attr_value_entry_encode_integer(
encodeEntry.data(), encodeEntry.size(), 0, PLDM_BIOS_PASSWORD, 10);
EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
- rc = pldm_bios_table_attr_value_entry_encode_integer_check(
+ rc = pldm_bios_table_attr_value_entry_encode_integer(
encodeEntry.data(), encodeEntry.size() - 1, 0,
PLDM_BIOS_INTEGER_READ_ONLY, 10);
EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);