Uniform syscap length.

Signed-off-by: yudechen <chenyude@huawei.com>
Change-Id: I68c43b300e2a729aae0a1aa7a287ee1916b1c5a1
This commit is contained in:
yudechen
2022-06-23 19:08:54 +08:00
parent ece61f39a5
commit c00a36983f
8 changed files with 46 additions and 35 deletions
+1 -2
View File
@@ -27,7 +27,6 @@ EXTERN_C_START
constexpr size_t OS_SYSCAP_U32_NUM = 30;
constexpr size_t PCID_MAIN_U32 = OS_SYSCAP_U32_NUM + 2;
constexpr size_t U32_TO_STR_MAX_LEN = 11;
constexpr size_t PCID_MAIN_LEN = 128;
constexpr size_t KEY_BUFFER_SIZE = 32;
#define PRINT_ERR(...) \
@@ -71,7 +70,7 @@ static char* getSystemCapability()
char osCapArray[PCID_MAIN_U32][U32_TO_STR_MAX_LEN] = {};
char (*priCapArray)[SINGLE_SYSCAP_LEN] = nullptr;
retBool = EncodeOsSyscap(osOutput, PCID_MAIN_LEN);
retBool = EncodeOsSyscap(osOutput, PCID_MAIN_BYTES);
if (!retBool) {
PRINT_ERR("get encoded os syscap failed.");
return nullptr;