mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 02:11:19 -04:00
@@ -26,7 +26,7 @@
|
||||
#define PCID_MAIN_BYTES 128
|
||||
#define PCID_MAIN_INTS 32
|
||||
|
||||
#define E_EORROR (-1)
|
||||
#define E_ERROR (-1)
|
||||
#define E_OK 0
|
||||
#define E_APIVERSION 1
|
||||
#define E_SYSCAP 2
|
||||
@@ -54,7 +54,7 @@ char *DecodeRpcidToStringFormat(const char *inputFile);
|
||||
* rpcidString, input string format rpcid.
|
||||
* result, output comparison results.
|
||||
* retval:
|
||||
* E_EORROR, compare failed.
|
||||
* E_ERROR, compare failed.
|
||||
* E_OK, compare successful and meet the requirements.
|
||||
* E_APIVERSION, compare successful but api version too low.
|
||||
* E_SYSCAP, compare successful but missing some syscaps.
|
||||
|
||||
+1
-1
@@ -759,7 +759,7 @@ int32_t DecodeStringPCIDToJson(char *input, char *outDirPath)
|
||||
ret = 0;
|
||||
|
||||
FAILED:
|
||||
SafeFree(jsonBuffer);
|
||||
cJSON_free(jsonBuffer);
|
||||
SafeFree(priSyscapStr);
|
||||
cJSON_Delete(sysCapObj);
|
||||
cJSON_Delete(rootObj);
|
||||
|
||||
@@ -208,7 +208,7 @@ def _check_path_prefix(paths):
|
||||
|
||||
def traversal_files(subsystem_path, _files):
|
||||
for item in os.scandir(subsystem_path):
|
||||
if is_symlik(item.path):
|
||||
if is_symlink(item.path):
|
||||
continue
|
||||
elif item.is_file() and item.name == 'ohos.build':
|
||||
_files.append(item.path)
|
||||
@@ -230,7 +230,7 @@ def get_file_type(file_path):
|
||||
return 'unknown'
|
||||
|
||||
|
||||
def is_symlik(file_path):
|
||||
def is_symlink(file_path):
|
||||
file_type = get_file_type(file_path)
|
||||
if file_type == 'symlink':
|
||||
link_target = os.readlink(file_path)
|
||||
|
||||
Reference in New Issue
Block a user