dsp: bios_table: Rename pldm_bios_table_attr_entry_enum_encode_check()
Introduce pldm_bios_table_attr_entry_enum_encode(), deprecate
pldm_bios_table_attr_entry_enum_encode_check(), add the rename
configuration and apply it.
Change-Id: I52586f960c5bda2a8c839d27c95bd65ca90c831f
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index da6a30a..4a0eea3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -46,6 +46,7 @@
The deprecated functions:
- `get_fru_record_by_option_check()`
+ - `pldm_bios_table_attr_entry_enum_encode_check()`
- `pldm_bios_table_string_entry_decode_string_check()`
- `pldm_bios_table_string_entry_encode_check()`
- `pldm_entity_association_pdr_add_check()`
diff --git a/abi/x86_64/gcc.dump b/abi/x86_64/gcc.dump
index 3da6907..0168ee6 100644
--- a/abi/x86_64/gcc.dump
+++ b/abi/x86_64/gcc.dump
@@ -1598,7 +1598,7 @@
},
'17275' => {
'Header' => 'bios_table.h',
- 'Line' => '638',
+ 'Line' => '641',
'Param' => {
'0' => {
'name' => 'table',
@@ -1618,7 +1618,7 @@
},
'17420' => {
'Header' => 'bios_table.h',
- 'Line' => '629',
+ 'Line' => '632',
'Param' => {
'0' => {
'name' => 'src_table',
@@ -1654,7 +1654,7 @@
},
'18108' => {
'Header' => 'bios_table.h',
- 'Line' => '595',
+ 'Line' => '598',
'Param' => {
'0' => {
'name' => 'table',
@@ -1847,7 +1847,7 @@
},
'20599' => {
'Header' => 'bios_table.h',
- 'Line' => '614',
+ 'Line' => '617',
'Param' => {
'0' => {
'name' => 'table',
@@ -1872,7 +1872,7 @@
},
'20899' => {
'Header' => 'bios_table.h',
- 'Line' => '602',
+ 'Line' => '605',
'Param' => {
'0' => {
'name' => 'size_without_pad',
@@ -1884,7 +1884,7 @@
},
'21254' => {
'Header' => 'bios_table.h',
- 'Line' => '577',
+ 'Line' => '580',
'Param' => {
'0' => {
'name' => 'entry',
@@ -1899,7 +1899,7 @@
},
'21303' => {
'Header' => 'bios_table.h',
- 'Line' => '584',
+ 'Line' => '587',
'Param' => {
'0' => {
'name' => 'entry',
@@ -1911,7 +1911,7 @@
},
'21787' => {
'Header' => 'bios_table.h',
- 'Line' => '551',
+ 'Line' => '554',
'Param' => {
'0' => {
'name' => 'entry',
@@ -1926,7 +1926,7 @@
},
'21927' => {
'Header' => 'bios_table.h',
- 'Line' => '567',
+ 'Line' => '570',
'Param' => {
'0' => {
'name' => 'entry',
@@ -1961,13 +1961,13 @@
},
'22196' => {
'Header' => 'bios_table.h',
- 'Line' => '545',
+ 'Line' => '548',
'Return' => '1145',
'ShortName' => 'pldm_bios_table_attr_value_entry_encode_integer_length'
},
'22358' => {
'Header' => 'bios_table.h',
- 'Line' => '538',
+ 'Line' => '541',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2007,7 +2007,7 @@
},
'22758' => {
'Header' => 'bios_table.h',
- 'Line' => '519',
+ 'Line' => '522',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2023,7 +2023,7 @@
},
'22853' => {
'Header' => 'bios_table.h',
- 'Line' => '509',
+ 'Line' => '512',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2038,7 +2038,7 @@
},
'22994' => {
'Header' => 'bios_table.h',
- 'Line' => '503',
+ 'Line' => '506',
'Param' => {
'0' => {
'name' => 'string_length',
@@ -2053,7 +2053,7 @@
},
'23176' => {
'Header' => 'bios_table.h',
- 'Line' => '493',
+ 'Line' => '496',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2090,7 +2090,7 @@
},
'23495' => {
'Header' => 'bios_table.h',
- 'Line' => '474',
+ 'Line' => '477',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2110,7 +2110,7 @@
},
'23742' => {
'Header' => 'bios_table.h',
- 'Line' => '464',
+ 'Line' => '467',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2125,7 +2125,7 @@
},
'23791' => {
'Header' => 'bios_table.h',
- 'Line' => '458',
+ 'Line' => '461',
'Param' => {
'0' => {
'name' => 'count',
@@ -2140,7 +2140,7 @@
},
'23840' => {
'Header' => 'bios_table.h',
- 'Line' => '451',
+ 'Line' => '454',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2155,7 +2155,7 @@
},
'23889' => {
'Header' => 'bios_table.h',
- 'Line' => '444',
+ 'Line' => '447',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2170,7 +2170,7 @@
},
'24436' => {
'Header' => 'bios_table.h',
- 'Line' => '436',
+ 'Line' => '439',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2205,7 +2205,7 @@
},
'24572' => {
'Header' => 'bios_table.h',
- 'Line' => '424',
+ 'Line' => '427',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2230,7 +2230,7 @@
},
'24844' => {
'Header' => 'bios_table.h',
- 'Line' => '405',
+ 'Line' => '408',
'Param' => {
'0' => {
'name' => 'info',
@@ -2246,13 +2246,13 @@
},
'25148' => {
'Header' => 'bios_table.h',
- 'Line' => '412',
+ 'Line' => '415',
'Return' => '1145',
'ShortName' => 'pldm_bios_table_attr_entry_integer_encode_length'
},
'25310' => {
'Header' => 'bios_table.h',
- 'Line' => '379',
+ 'Line' => '382',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2272,7 +2272,7 @@
},
'25579' => {
'Header' => 'bios_table.h',
- 'Line' => '371',
+ 'Line' => '374',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2287,7 +2287,7 @@
},
'25648' => {
'Header' => 'bios_table.h',
- 'Line' => '363',
+ 'Line' => '366',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2302,7 +2302,7 @@
},
'25717' => {
'Header' => 'bios_table.h',
- 'Line' => '355',
+ 'Line' => '358',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2317,7 +2317,7 @@
},
'25786' => {
'Header' => 'bios_table.h',
- 'Line' => '347',
+ 'Line' => '350',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2337,7 +2337,7 @@
},
'25956' => {
'Header' => 'bios_table.h',
- 'Line' => '336',
+ 'Line' => '339',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2361,7 +2361,7 @@
},
'26320' => {
'Header' => 'bios_table.h',
- 'Line' => '315',
+ 'Line' => '318',
'Param' => {
'0' => {
'name' => 'info',
@@ -2380,7 +2380,7 @@
},
'26589' => {
'Header' => 'bios_table.h',
- 'Line' => '323',
+ 'Line' => '326',
'Param' => {
'0' => {
'name' => 'def_str_len',
@@ -2395,7 +2395,7 @@
},
'26821' => {
'Header' => 'bios_table.h',
- 'Line' => '289',
+ 'Line' => '292',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2415,7 +2415,7 @@
},
'27100' => {
'Header' => 'bios_table.h',
- 'Line' => '277',
+ 'Line' => '280',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2440,7 +2440,7 @@
},
'27265' => {
'Header' => 'bios_table.h',
- 'Line' => '260',
+ 'Line' => '263',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2460,7 +2460,7 @@
},
'27427' => {
'Header' => 'bios_table.h',
- 'Line' => '250',
+ 'Line' => '253',
'Param' => {
'0' => {
'name' => 'entry',
@@ -2500,7 +2500,7 @@
'2' => 'rbx'
},
'Return' => '100',
- 'ShortName' => 'pldm_bios_table_attr_entry_enum_encode_check'
+ 'ShortName' => 'pldm_bios_table_attr_entry_enum_encode'
},
'27821' => {
'Header' => 'bios_table.h',
@@ -9454,6 +9454,7 @@
'pldm_bios_table_attr_entry_enum_decode_def_num_check' => 1,
'pldm_bios_table_attr_entry_enum_decode_pv_hdls_check' => 1,
'pldm_bios_table_attr_entry_enum_decode_pv_num_check' => 1,
+ 'pldm_bios_table_attr_entry_enum_encode' => 1,
'pldm_bios_table_attr_entry_enum_encode_check' => 1,
'pldm_bios_table_attr_entry_enum_encode_length' => 1,
'pldm_bios_table_attr_entry_integer_decode' => 1,
@@ -10388,7 +10389,7 @@
},
'16385' => {
'Header' => 'bios_table.h',
- 'Line' => '299',
+ 'Line' => '302',
'Memb' => {
'0' => {
'name' => 'name_handle',
@@ -10438,7 +10439,7 @@
},
'16507' => {
'Header' => 'bios_table.h',
- 'Line' => '389',
+ 'Line' => '392',
'Memb' => {
'0' => {
'name' => 'name_handle',
diff --git a/evolutions/current/pldm_bios_table_attr_entry_enum_encode_check.yaml b/evolutions/current/pldm_bios_table_attr_entry_enum_encode_check.yaml
new file mode 100644
index 0000000..b8f7fa1
--- /dev/null
+++ b/evolutions/current/pldm_bios_table_attr_entry_enum_encode_check.yaml
@@ -0,0 +1,2 @@
+- QualifiedName: pldm_bios_table_attr_entry_enum_encode_check
+ NewName: pldm_bios_table_attr_entry_enum_encode
diff --git a/include/libpldm/bios_table.h b/include/libpldm/bios_table.h
index 1d053a6..e80acf6 100644
--- a/include/libpldm/bios_table.h
+++ b/include/libpldm/bios_table.h
@@ -236,6 +236,9 @@
* value for entry_length can be determined using @ref
* pldm_bios_table_attr_entry_enum_encode_length.
*/
+int pldm_bios_table_attr_entry_enum_encode(
+ void *entry, size_t entry_length,
+ const struct pldm_bios_table_attr_entry_enum_info *info);
int pldm_bios_table_attr_entry_enum_encode_check(
void *entry, size_t entry_length,
const struct pldm_bios_table_attr_entry_enum_info *info);
diff --git a/meson.build b/meson.build
index 9634b59..f817919 100644
--- a/meson.build
+++ b/meson.build
@@ -34,6 +34,7 @@
add_project_arguments('-DLIBPLDM_API_DEPRECATED', language: ['c', 'cpp'])
libpldm_deprecated_aliases += [
['get_fru_record_by_option_check', 'get_fru_record_by_option'],
+ ['pldm_bios_table_attr_entry_enum_encode_check', 'pldm_bios_table_attr_entry_enum_encode'],
['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'],
['pldm_entity_association_pdr_add_check', 'pldm_entity_association_pdr_add'],
diff --git a/src/dsp/bios_table.c b/src/dsp/bios_table.c
index 753f7ee..daa4278 100644
--- a/src/dsp/bios_table.c
+++ b/src/dsp/bios_table.c
@@ -194,7 +194,7 @@
}
LIBPLDM_ABI_STABLE
-int pldm_bios_table_attr_entry_enum_encode_check(
+int pldm_bios_table_attr_entry_enum_encode(
void *entry, size_t entry_length,
const struct pldm_bios_table_attr_entry_enum_info *info)
{
diff --git a/tests/dsp/bios_table.cpp b/tests/dsp/bios_table.cpp
index f23be9a..4d81a03 100644
--- a/tests/dsp/bios_table.cpp
+++ b/tests/dsp/bios_table.cpp
@@ -170,8 +170,8 @@
EXPECT_EQ(encodeLength, enumEntry.size());
std::vector<uint8_t> encodeEntry(encodeLength, 0);
- ASSERT_EQ(pldm_bios_table_attr_entry_enum_encode_check(
- encodeEntry.data(), encodeEntry.size(), &info),
+ ASSERT_EQ(pldm_bios_table_attr_entry_enum_encode(encodeEntry.data(),
+ encodeEntry.size(), &info),
PLDM_SUCCESS);
// set attr handle = 0
encodeEntry[0] = 0;
@@ -179,19 +179,19 @@
EXPECT_EQ(enumEntry, encodeEntry);
- EXPECT_NE(pldm_bios_table_attr_entry_enum_encode_check(
+ EXPECT_NE(pldm_bios_table_attr_entry_enum_encode(
encodeEntry.data(), encodeEntry.size() - 1, &info),
PLDM_SUCCESS);
- auto rc = pldm_bios_table_attr_entry_enum_encode_check(
- encodeEntry.data(), encodeEntry.size(), &info);
+ auto rc = pldm_bios_table_attr_entry_enum_encode(encodeEntry.data(),
+ encodeEntry.size(), &info);
EXPECT_EQ(rc, PLDM_SUCCESS);
// set attr handle = 0
encodeEntry[0] = 0;
encodeEntry[1] = 0;
EXPECT_EQ(enumEntry, encodeEntry);
- rc = pldm_bios_table_attr_entry_enum_encode_check(
- encodeEntry.data(), encodeEntry.size() - 1, &info);
+ rc = pldm_bios_table_attr_entry_enum_encode(encodeEntry.data(),
+ encodeEntry.size() - 1, &info);
EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
}