From 1fa852f0395c42a175e2ea1d632c143e0832282b Mon Sep 17 00:00:00 2001 From: redjie Date: Mon, 25 Apr 2022 18:32:29 +0800 Subject: [PATCH 1/2] spell check : invaild->invalid Signed-off-by: redjie Change-Id: Id0a37d55d960bd0c30d056badafccd8e86da253f --- src/syscap_tool.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/syscap_tool.c b/src/syscap_tool.c index 367351a..4874ada 100755 --- a/src/syscap_tool.c +++ b/src/syscap_tool.c @@ -230,7 +230,7 @@ int32_t PCIDEncode(char *inputFile, char *outDirPath) (!strcmp(systemType, "small") ? 0b010 : (!strcmp(systemType, "standard") ? 0b100 : 0)); if (headPtr->systemType == 0) { - PRINT_ERR("\"system_type\" is invaild, systemType = \"%s\"\n", systemType); + PRINT_ERR("\"system_type\" is invalid, systemType = \"%s\"\n", systemType); ret = -1; goto FREE_CONVERT_OUT; } @@ -254,20 +254,20 @@ int32_t PCIDEncode(char *inputFile, char *outDirPath) arrayItemPtr = cJSON_GetArrayItem(osCapPtr, i); char *pointPos = strchr(arrayItemPtr->valuestring, '.'); if (pointPos == NULL) { - PRINT_ERR("context of \"os\" array is invaild\n"); + PRINT_ERR("context of \"os\" array is invalid\n"); ret = -1; goto FREE_CONVERT_OUT; } ret = strncmp(arrayItemPtr->valuestring, "SystemCapability.", pointPos - arrayItemPtr->valuestring + 1); if (ret != 0) { - PRINT_ERR("context of \"os\" array is invaild\n"); + PRINT_ERR("context of \"os\" array is invalid\n"); ret = -1; goto FREE_CONVERT_OUT; } ret = memcpy_s(fillTmpPtr, SINGLE_FEAT_LENGTH, pointPos + 1, strlen(pointPos + 1)); if (ret != 0) { - PRINT_ERR("context of \"os\" array is invaild\n"); + PRINT_ERR("context of \"os\" array is invalid\n"); ret = -1; goto FREE_CONVERT_OUT; } @@ -284,20 +284,20 @@ int32_t PCIDEncode(char *inputFile, char *outDirPath) arrayItemPtr = cJSON_GetArrayItem(privateCapPtr, i); char *pointPos = strchr(arrayItemPtr->valuestring, '.'); if (pointPos == NULL) { - PRINT_ERR("context of \"private\" array is invaild\n"); + PRINT_ERR("context of \"private\" array is invalid\n"); ret = -1; goto FREE_CONVERT_OUT; } ret = strncmp(arrayItemPtr->valuestring, "SystemCapability.", pointPos - arrayItemPtr->valuestring + 1); if (ret != 0) { - PRINT_ERR("context of \"private\" array is invaild\n"); + PRINT_ERR("context of \"private\" array is invalid\n"); ret = -1; goto FREE_CONVERT_OUT; } ret = memcpy_s(fillTmpPtr, SINGLE_FEAT_LENGTH, pointPos + 1, strlen(pointPos + 1)); if (ret != 0) { - PRINT_ERR("context of \"private\" array is invaild\n"); + PRINT_ERR("context of \"private\" array is invalid\n"); ret = -1; goto FREE_CONVERT_OUT; } @@ -380,13 +380,13 @@ int32_t PCIDDecode(char *inputFile, char *outDirPath) // 2, to save osSysCaptype & osSysCapLength osCapArrayPtr = contextBuffer + sizeof(PCIDHead) + 2 * sizeof(uint16_t); if (contextBufferTail <= osCapArrayPtr) { - PRINT_ERR("prase file failed, format is invaild, input file : %s\n", inputFile); + PRINT_ERR("prase file failed, format is invalid, input file : %s\n", inputFile); ret = -1; goto FREE_CONTEXT_OUT; } headPtr = (PCIDHead *)contextBuffer; if (headPtr->apiVersionType != 0) { - PRINT_ERR("prase file failed, apiVersionType is invaild, input file : %s\n", inputFile); + PRINT_ERR("prase file failed, apiVersionType is invalid, input file : %s\n", inputFile); ret = -1; goto FREE_CONTEXT_OUT; } @@ -395,14 +395,14 @@ int32_t PCIDDecode(char *inputFile, char *outDirPath) (headPtr->systemType == 0b010 ? "small" : (headPtr->systemType == 0b100 ? "standard" : NULL)); if (systemType == NULL) { - PRINT_ERR("prase file failed, systemType is invaild, %d\n", headPtr->systemType); + PRINT_ERR("prase file failed, systemType is invalid, %d\n", headPtr->systemType); ret = -1; goto FREE_CONTEXT_OUT; } sysCaptype = NtohsInter(*(uint16_t *)(osCapArrayPtr - 2 * sizeof(uint16_t))); // 2, for type & length if (sysCaptype != 0) { - PRINT_ERR("prase file failed, sysCaptype is invaild, %d\n", sysCaptype); + PRINT_ERR("prase file failed, sysCaptype is invalid, %d\n", sysCaptype); ret = -1; goto FREE_CONTEXT_OUT; } @@ -427,7 +427,7 @@ int32_t PCIDDecode(char *inputFile, char *outDirPath) } for (int32_t i = 0; i < (sysCapLength / SINGLE_FEAT_LENGTH); i++) { if (*(osCapArrayPtr + (i + 1) * SINGLE_FEAT_LENGTH - 1) != '\0') { - PRINT_ERR("prase file failed, format is invaild, input file : %s\n", inputFile); + PRINT_ERR("prase file failed, format is invalid, input file : %s\n", inputFile); ret = -1; goto FREE_VECTOR_OUT; } @@ -456,13 +456,13 @@ int32_t PCIDDecode(char *inputFile, char *outDirPath) if (contextBufferTail >= privateCapArrayPtr) { sysCaptype = NtohsInter(*(uint16_t *)(privateCapArrayPtr - 2 * sizeof(uint16_t))); // 2, for type & length if (sysCaptype != 1) { - PRINT_ERR("prase file failed, format is invaild, input file : %s\n", inputFile); + PRINT_ERR("prase file failed, format is invalid, input file : %s\n", inputFile); ret = -1; goto FREE_SYSCAP_OUT; } sysCapLength = NtohsInter(*(uint16_t *)(privateCapArrayPtr - sizeof(uint16_t))); if (contextBufferTail < privateCapArrayPtr + sysCapLength) { - PRINT_ERR("prase file failed, format is invaild, input file : %s\n", inputFile); + PRINT_ERR("prase file failed, format is invalid, input file : %s\n", inputFile); ret = -1; goto FREE_SYSCAP_OUT; } @@ -476,7 +476,7 @@ int32_t PCIDDecode(char *inputFile, char *outDirPath) for (int32_t i = 0; i < (sysCapLength / SINGLE_FEAT_LENGTH); i++) { if (*(privateCapArrayPtr + (i + 1) * SINGLE_FEAT_LENGTH - 1) != '\0') { - PRINT_ERR("prase file failed, format is invaild, input file : %s\n", inputFile); + PRINT_ERR("prase file failed, format is invalid, input file : %s\n", inputFile); ret = -1; goto FREE_VECTOR_OUT; } @@ -633,20 +633,20 @@ int32_t RPCIDEncode(char *inputFile, char *outDirPath) arrayItemPtr = cJSON_GetArrayItem(sysCapPtr, i); char *pointPos = strchr(arrayItemPtr->valuestring, '.'); if (pointPos == NULL) { - PRINT_ERR("context of \"syscap\" array is invaild\n"); + PRINT_ERR("context of \"syscap\" array is invalid\n"); ret = -1; goto FREE_CONVERT_OUT; } ret = strncmp(arrayItemPtr->valuestring, "SystemCapability.", pointPos - arrayItemPtr->valuestring + 1); if (ret != 0) { - PRINT_ERR("context of \"syscap\" array is invaild\n"); + PRINT_ERR("context of \"syscap\" array is invalid\n"); ret = -1; goto FREE_CONVERT_OUT; } ret = memcpy_s(fillTmpPtr, SINGLE_FEAT_LENGTH, pointPos + 1, strlen(pointPos + 1)); if (ret != 0) { - PRINT_ERR("context of \"syscap\" array is invaild\n"); + PRINT_ERR("context of \"syscap\" array is invalid\n"); ret = -1; goto FREE_CONVERT_OUT; } @@ -689,27 +689,27 @@ int32_t RPCIDDecode(char *inputFile, char *outDirPath) // 2, to save osSysCaptype & osSysCapLength sysCapArrayPtr = contextBuffer + sizeof(RPCIDHead) + 2 * sizeof(uint16_t); if (contextBufferTail <= sysCapArrayPtr) { - PRINT_ERR("prase file failed, format is invaild, input file : %s\n", inputFile); + PRINT_ERR("prase file failed, format is invalid, input file : %s\n", inputFile); ret = -1; goto FREE_CONTEXT_OUT; } headPtr = (RPCIDHead *)contextBuffer; if (headPtr->apiVersionType != 1) { - PRINT_ERR("prase file failed, format is invaild, input file : %s\n", inputFile); + PRINT_ERR("prase file failed, format is invalid, input file : %s\n", inputFile); ret = -1; goto FREE_CONTEXT_OUT; } sysCaptype = NtohsInter(*(uint16_t *)(sysCapArrayPtr - 2 * sizeof(uint16_t))); // 2, for type & length if (sysCaptype != 2) { // 2, app syscap type - PRINT_ERR("prase file failed, format is invaild, input file : %s\n", inputFile); + PRINT_ERR("prase file failed, format is invalid, input file : %s\n", inputFile); ret = -1; goto FREE_CONTEXT_OUT; } sysCapLength = NtohsInter(*(uint16_t *)(sysCapArrayPtr - sizeof(uint16_t))); if (contextBufferTail < sysCapArrayPtr + sysCapLength) { - PRINT_ERR("prase file failed, format is invaild, input file : %s\n", inputFile); + PRINT_ERR("prase file failed, format is invalid, input file : %s\n", inputFile); ret = -1; goto FREE_CONTEXT_OUT; } @@ -722,7 +722,7 @@ int32_t RPCIDDecode(char *inputFile, char *outDirPath) } for (int32_t i = 0; i < (sysCapLength / SINGLE_FEAT_LENGTH); i++) { if (*(sysCapArrayPtr + (i + 1) * SINGLE_FEAT_LENGTH - 1) != '\0') { - PRINT_ERR("prase file failed, format is invaild, input file : %s\n", inputFile); + PRINT_ERR("prase file failed, format is invalid, input file : %s\n", inputFile); ret = -1; goto FREE_SYSCAP_OUT; } -- Gitee From 06cc55e903847aff6b05ef607f963bd4651ce9da Mon Sep 17 00:00:00 2001 From: redjie Date: Tue, 26 Apr 2022 10:23:50 +0800 Subject: [PATCH 2/2] file permissions 755->644 Signed-off-by: redjie Change-Id: Id76173972becd534dfa3e06ea78983223b25fedd --- BUILD.gn | 0 LICENSE | 0 README.md | 0 README_ZH.md | 0 RELEASE-NOTE.txt | 0 bundle.json | 0 include/syscap_tool.h | 0 src/endian_internal.c | 0 src/endian_internal.h | 0 src/main.c | 0 src/syscap_tool.c | 0 test/syscap_tool_test.c | 0 12 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 BUILD.gn mode change 100755 => 100644 LICENSE mode change 100755 => 100644 README.md mode change 100755 => 100644 README_ZH.md mode change 100755 => 100644 RELEASE-NOTE.txt mode change 100755 => 100644 bundle.json mode change 100755 => 100644 include/syscap_tool.h mode change 100755 => 100644 src/endian_internal.c mode change 100755 => 100644 src/endian_internal.h mode change 100755 => 100644 src/main.c mode change 100755 => 100644 src/syscap_tool.c mode change 100755 => 100644 test/syscap_tool_test.c diff --git a/BUILD.gn b/BUILD.gn old mode 100755 new mode 100644 diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/README_ZH.md b/README_ZH.md old mode 100755 new mode 100644 diff --git a/RELEASE-NOTE.txt b/RELEASE-NOTE.txt old mode 100755 new mode 100644 diff --git a/bundle.json b/bundle.json old mode 100755 new mode 100644 diff --git a/include/syscap_tool.h b/include/syscap_tool.h old mode 100755 new mode 100644 diff --git a/src/endian_internal.c b/src/endian_internal.c old mode 100755 new mode 100644 diff --git a/src/endian_internal.h b/src/endian_internal.h old mode 100755 new mode 100644 diff --git a/src/main.c b/src/main.c old mode 100755 new mode 100644 diff --git a/src/syscap_tool.c b/src/syscap_tool.c old mode 100755 new mode 100644 diff --git a/test/syscap_tool_test.c b/test/syscap_tool_test.c old mode 100755 new mode 100644 -- Gitee