fru: Stabilise get_fru_record_by_option_check()

get_fru_record_by_option_check() is a replacement for
get_fru_record_by_option(). The latter sanitized its arguments using
assert() while the former instead returns a value indicating success or
failure.

Use of get_fru_record_by_option_check() is demonstrated in the following
patch:

https://gerrit.openbmc.org/c/openbmc/pldm/+/64628

Additionally, deprecate get_fru_record_by_option() now that there's a
stable replacement.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I80c77b12606ffe6aa5c38086fc162bbe34f2dd2f
diff --git a/src/fru.c b/src/fru.c
index 39d8576..9d6f575 100644
--- a/src/fru.c
+++ b/src/fru.c
@@ -211,7 +211,7 @@
 							    table_size);
 }
 
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED
 void get_fru_record_by_option(const uint8_t *table, size_t table_size,
 			      uint8_t *record_table, size_t *record_size,
 			      uint16_t rsi, uint8_t rt, uint8_t ft)
@@ -222,7 +222,7 @@
 	assert(rc == PLDM_SUCCESS);
 }
 
-LIBPLDM_ABI_TESTING
+LIBPLDM_ABI_STABLE
 int get_fru_record_by_option_check(const uint8_t *table, size_t table_size,
 				   uint8_t *record_table, size_t *record_size,
 				   uint16_t rsi, uint8_t rt, uint8_t ft)