mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 02:11:19 -04:00
add length argument of funcation EncodeOsSyscap.
Signed-off-by: yudechen <chenyude@huawei.com> Change-Id: If65b898671e0d035a578e34ba52c442b1a48de80
This commit is contained in:
@@ -27,6 +27,7 @@ EXTERN_C_START
|
||||
constexpr size_t OS_SYSCAP_U32_NUM = 30;
|
||||
constexpr size_t U32_TO_STR_MAX_LEN = 11;
|
||||
constexpr size_t SYSCAP_STR_MAX_LEN = 128;
|
||||
constexpr size_t PCID_MAIN_LEN = 128;
|
||||
constexpr size_t KEY_BUFFER_SIZE = 32;
|
||||
|
||||
#define PRINT_ERR(...) \
|
||||
@@ -70,7 +71,7 @@ static char* getSystemCapability()
|
||||
char osCapArray[OS_SYSCAP_U32_NUM][U32_TO_STR_MAX_LEN] = {};
|
||||
char (*priCapArray)[SYSCAP_STR_MAX_LEN] = nullptr;
|
||||
|
||||
retBool = EncodeOsSyscap(osOutput);
|
||||
retBool = EncodeOsSyscap(osOutput, PCID_MAIN_LEN);
|
||||
if (!retBool) {
|
||||
PRINT_ERR("get encoded os syscap failed.");
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user