mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 02:11:19 -04:00
@@ -652,6 +652,7 @@ int32_t ComparePcidString(const char *pcidString, const char *rpcidString, Compa
|
||||
&pcidPriSyscapInfo.rpcidPriSyscap, &pcidPriSyscapInfo.rpcidPriSyscapLen);
|
||||
if (pcidPriSyscapInfo.ret != 0) {
|
||||
PRINT_ERR("Separate syscap from string failed. ret = %d\n", pcidPriSyscapInfo.ret);
|
||||
free(pcidPriSyscapInfo.rpcidPriSyscap);
|
||||
return -1;
|
||||
}
|
||||
result->missSyscapNum = 0;
|
||||
|
||||
@@ -160,6 +160,7 @@ int32_t CheckRpcidFormat(const char *inputFile, char **buffer, uint32_t *len)
|
||||
rpcidHeader = (RPCIDHead *)contextBuffer;
|
||||
if (rpcidHeader->apiVersionType != 1) {
|
||||
PRINT_ERR("Parse file failed(apiVersionType != 1), input file : %s\n", inputFile);
|
||||
free(contextBuffer);
|
||||
return -1;
|
||||
}
|
||||
sysCaptype = NtohsInter(*(uint16_t *)(rpcidHeader + 1));
|
||||
|
||||
@@ -735,6 +735,12 @@ int32_t DecodeStringPCIDToJson(char *input, char *outDirPath)
|
||||
PRINT_ERR("Add os syscap json object failed.\n");
|
||||
goto ADD_JSON_FAILED;
|
||||
}
|
||||
|
||||
if (priSyscapStr == null){
|
||||
PRINT_ERR("priSyscapStr is null.\n");
|
||||
goto ADD_JSON_FAILED;
|
||||
}
|
||||
|
||||
if (AddPriSyscapToJsonObj(priSyscapStr, (uint32_t)strlen(priSyscapStr), sysCapObj) != 0) {
|
||||
PRINT_ERR("Add private syscap json object failed.\n");
|
||||
goto ADD_JSON_FAILED;
|
||||
|
||||
@@ -705,6 +705,7 @@ int32_t ComparePcidWithRpcidString(char *pcidFile, char *rpcidFile, uint32_t typ
|
||||
&rpcidPriSyscap, &rpcidPriSyscapLen);
|
||||
if (ret != 0) {
|
||||
PRINT_ERR("Separate syscap from string failed. ret = %d\n", ret);
|
||||
free(pcidContent);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user