diff --git a/Kconfig b/Kconfig index e13c404a819f7aded57363c95857fcd52c5e8535..8041b61d84e200970ee65ef113a8648291fb1950 100644 --- a/Kconfig +++ b/Kconfig @@ -189,7 +189,7 @@ config DEBUG_VERSION It also means you do not want to use debug modules, like shell,telnet,tftp,nfs and memory check, etc. If you select this option that means you enable a debug version for LiteOS. - That means you want a opposite behaviour compared to release version. + That means you want an opposite behaviour compared to release version. config DEBUG_KERNEL bool "Enable Debug LiteOS Kernel Resource" @@ -198,7 +198,7 @@ config DEBUG_KERNEL help If you select this option that means you enable debugging kernel resource. It also means you want to get queue, mutex, semaphore, memory debug information. - That means you want a opposite behaviour compared to release version. + That means you want an opposite behaviour compared to release version. config DEBUG_QUEUE bool "Enable Queue Debugging" @@ -265,7 +265,7 @@ config MEM_LEAKCHECK default n depends on DEBUG_VERSION && MEM_DEBUG help - Answer Y to enable record the LR of Function call stack of Mem operation, it can check the mem leak through the infomations of mem node. + Answer Y to enable record the LR of Function call stack of Mem operation, it can check the mem leak through the informations of mem node. config BASE_MEM_NODE_INTEGRITY_CHECK bool "Enable integrity check or not" default n diff --git a/Makefile b/Makefile index 9c026c662c2bc3aa933e212af2d6ae575c2a4ec6..8122156f788ef4d3c76ba15d63a5864ac6ecef0c 100644 --- a/Makefile +++ b/Makefile @@ -97,7 +97,7 @@ Targets: cleanall: clean all build outputs all: make liteos kernel image and rootfs image (Default target) $(APPS): build all apps - $(ROOTFS): make a original rootfs image + $(ROOTFS): make an original rootfs image $(LITEOS_LIBS_TARGET): compile all kernel modules (libraries) $(LITEOS_TARGET): make liteos kernel image update_config: update product kernel config (use menuconfig) diff --git a/OAT.xml b/OAT.xml index 7642fb20f0aeae6f9bfd57a61a167d16b7ff3b19..dc080fc80df049c7b0b0159a95009ea19a1f8a5c 100644 --- a/OAT.xml +++ b/OAT.xml @@ -12,9 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +--> - This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README. - + diff --git a/README.md b/README.md index 3ceb1c5d4ebed374c54d89d4c374195facfe5c7d..e566afa6ebd1e8ec6a5b7b24a2bb7cea08480596 100644 --- a/README.md +++ b/README.md @@ -73,9 +73,9 @@ OpenHarmony LiteOS Cortex-A supports the [Hi3518E V300](https://gitee.com/openh You need to set up the compilation environment on Linux. -- [Compilation environment on Linux](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-lite-env-setup-lin.md) -- For Hi3518E V300, see [Setting Up the Hi3518 Development Environment](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-lite-steps-board3518-setting.md). -- For Hi3516D V300, see [Setting Up the Hi3516 Development Environment](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-lite-steps-board3516-setting.md). +- [Compilation environment on Linux](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-lite-env-setup-linux.md) +- For Hi3518E V300, see [Setting Up the Hi3518 Development Environment](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-lite-steps-hi3518-setting.md). +- For Hi3516D V300, see [Setting Up the Hi3516 Development Environment](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-lite-steps-hi3516-setting.md). ### Source Code Acquisition @@ -85,9 +85,9 @@ Download and decompress a set of source code on a Linux server to acquire the [ For details about how to develop the first application, see: -- [Developing the First Example Program Running on Hi3518](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-lite-steps-board3518-running.md) +- [Developing the First Example Program Running on Hi3518](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-lite-steps-hi3518-running.md) -- [Developing the First Example Program Running on Hi3516](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-lite-steps-board3516-running.md) +- [Developing the First Example Program Running on Hi3516](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/quickstart-lite-steps-hi3516-running.md) ## Repositories Involved @@ -95,5 +95,5 @@ For details about how to develop the first application, see: [drivers\_liteos](https://gitee.com/openharmony/drivers_liteos/blob/master/README.md) -**kernel\_liteos\_a** +[kernel\_liteos\_a](https://gitee.com/openharmony/kernel_liteos_a/blob/master/README.md) diff --git a/README_zh-HK.md b/README_zh-HK.md index 9847f8bca22f86815cfbc46651c6d82d78eb2313..53ce84710ef0eab0dc4bdc5ef90fa5174bb8e483 100644 --- a/README_zh-HK.md +++ b/README_zh-HK.md @@ -95,4 +95,4 @@ OpenHarmony LiteOS-A內核支持Hi3518EV300([介紹](https://gitee.com/openhar [drivers\_liteos](https://gitee.com/openharmony/drivers_liteos/blob/master/README_zh.md) -**kernel\_liteos\_a** +[kernel\_liteos\_a](https://gitee.com/openharmony/kernel_liteos_a/blob/master/README_zh-HK.md) diff --git a/README_zh.md b/README_zh.md index 42ea3ff5654f21ea4012a3e8b39f18dffb2ff5ac..a74ec64b54e00220b6a24806f5dc8cb2f15c56a0 100644 --- a/README_zh.md +++ b/README_zh.md @@ -94,5 +94,5 @@ OpenHarmony LiteOS-A内核支持Hi3518EV300([介绍](https://gitee.com/openhar [drivers\_liteos](https://gitee.com/openharmony/drivers_liteos/blob/master/README_zh.md) -**kernel\_liteos\_a** +[kernel\_liteos\_a](https://gitee.com/openharmony/kernel_liteos_a/blob/master/README_zh.md) diff --git a/apps/init/src/init.c b/apps/init/src/init.c index 39de64d39dc098103d50ca5ffba391f5063ceaee..ae84ace8db07c0c65df63b08be26a749fcbe336f 100644 --- a/apps/init/src/init.c +++ b/apps/init/src/init.c @@ -48,6 +48,7 @@ #endif int main(int argc, char * const *argv) { + (void)argv; int ret; pid_t gid; const char *shellPath = "/bin/mksh"; diff --git a/apps/shell/src/shcmd.c b/apps/shell/src/shcmd.c index d8563e3a95d248b2be1a5ba189d9fc920039abd3..e51dee3d685586dd4188f15a8db1af928f6068d8 100644 --- a/apps/shell/src/shcmd.c +++ b/apps/shell/src/shcmd.c @@ -36,7 +36,6 @@ #include "dirent.h" #include "securec.h" - #define SHELL_INIT_MAGIC_FLAG 0xABABABAB #define CTRL_C 0x03 /* 0x03: ctrl+c ASCII */ @@ -378,7 +377,7 @@ static int OsTabMatchFile(char *cmdKey, unsigned int *len) * Description: Pass in the string and clear useless space ,which include: * 1) The overmatch space which is not be marked by Quote's area * Squeeze the overmatch space into one space - * 2) Clear all space before first valid charatctor + * 2) Clear all space before first valid character * Input: cmdKey : Pass in the buff string, which is ready to be operated * cmdOut : Pass out the buffer string ,which has already been operated * size : cmdKey length @@ -407,17 +406,17 @@ unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size) /* Backup the 'output' start address */ outputBak = output; - /* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invalid charactor */ + /* Scan each character in 'cmdKey',and squeeze the overmuch space and ignore invalid character */ for (; *cmdKey != '\0'; cmdKey++) { /* Detected a Double Quotes, switch the matching status */ if (*(cmdKey) == '\"') { SWITCH_QUOTES_STATUS(quotes); } - /* Ignore the current charactor in following situation */ + /* Ignore the current character in following situation */ /* 1) Quotes matching status is FALSE (which said that the space is not been marked by double quotes) */ - /* 2) Current charactor is a space */ - /* 3) Next charactor is a space too, or the string is been seeked to the end already(\0) */ - /* 4) Invalid charactor, such as single quotes */ + /* 2) Current character is a space */ + /* 3) Next character is a space too, or the string is been seeked to the end already(\0) */ + /* 4) Invalid character, such as single quotes */ if ((*cmdKey == ' ') && ((*(cmdKey + 1) == ' ') || (*(cmdKey + 1) == '\0')) && QUOTES_STATUS_CLOSE(quotes)) { continue; } @@ -431,7 +430,7 @@ unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size) /* Restore the 'output' start address */ output = outputBak; len = strlen(output); - /* Clear the space which is located at the first charactor in buffer */ + /* Clear the space which is located at the first character in buffer */ if (*output == ' ') { output++; len--; @@ -585,7 +584,6 @@ END: unsigned int OsCmdExec(CmdParsed *cmdParsed, char *cmdStr) { - /* TODO: complete the usrspace command */ unsigned int ret = SH_OK; if (cmdParsed && cmdStr) { ret = SH_NOK; diff --git a/apps/shell/src/shmsg.c b/apps/shell/src/shmsg.c index 40a18d7ce6c3238d91365d79fa8cd222246395ed..0fb2b69d6267c3110823c041ca977e8dbc4e0c64 100644 --- a/apps/shell/src/shmsg.c +++ b/apps/shell/src/shmsg.c @@ -334,12 +334,12 @@ char *GetCmdName(const char *cmdline, unsigned int len) /* If reach a double quotes, switch the quotes matching status */ if (*tmpStr == '\"') { SWITCH_QUOTES_STATUS(quotes); - /* Ignore the double quote charactor itself */ + /* Ignore the double quote character itself */ tmpStr++; continue; } /* If detected a space which the quotes matching status is false */ - /* which said has detected the first space for seperator, finish this scan operation */ + /* which said has detected the first space for separator, finish this scan operation */ if ((*tmpStr == ' ') && (QUOTES_STATUS_CLOSE(quotes))) { break; } @@ -503,7 +503,7 @@ unsigned int PreHandleCmdline(const char *input, char **output, unsigned int *ou *output = shiftStr; *outputlen = shiftLen; - /* Check and parse "./", located at the first two charaters of the cmd */ + /* Check and parse "./", located at the first two characters of the cmd */ if ((shiftLen > removeLen) && (shiftStr[0] == '.') && (shiftStr[1] == '/')) { execLen = strlen(execCmd); newLen = execLen + shiftLen - removeLen; /* i.e., newLen - execLen == shiftLen - removeLen */ diff --git a/apps/tftp/include/tftpc.h b/apps/tftp/include/tftpc.h index 3d0bf568ced68334ff1fd33f8f6d55bf5bbc7074..1ada9b43981235523a7ef47cbd3218dee99e81d1 100644 --- a/apps/tftp/include/tftpc.h +++ b/apps/tftp/include/tftpc.h @@ -42,7 +42,7 @@ extern "C" { #define TFTP_NULL_UINT32 ((u32_t)0xffffffffUL) -#define TFTP_NULL_INT32 -1 +#define TFTP_NULL_INT32 (-1) /** @cond liteos * @defgroup TFTP_Interfaces @@ -114,7 +114,7 @@ typedef enum tagTFTPC_OpCode { TFTPC_OP_RRQ = 1, /* read request */ TFTPC_OP_WRQ, /* write request */ TFTPC_OP_DATA, /* data packet */ - TFTPC_OP_ACK, /* acknowledgement */ + TFTPC_OP_ACK, /* acknowledgment */ TFTPC_OP_ERROR, /* error code */ TFTPC_OP_OPT /* option code */ } TFTPC_OPCODE_E; diff --git a/apps/tftp/src/main.c b/apps/tftp/src/main.c index 4a476c746395d8ff7ca51c4fb78c6db280799090..c652821d0b38ff22fbe41b2ae018d98ff8a5528b 100644 --- a/apps/tftp/src/main.c +++ b/apps/tftp/src/main.c @@ -50,11 +50,11 @@ static char *TftpError[] = { "Error while sending data to the peer\n", "Requested file is not found\n", "This is the error sent by the server when hostname cannot be resolved\n", - "Input paramters passed to TFTP interfaces are invalid\n", + "Input parameters passed to TFTP interfaces are invalid\n", "Error detected in TFTP packet or the error received from the TFTP server\n", "Error during packet synhronization while sending or unexpected packet is received\n", "File size limit crossed, Max block can be 0xFFFF, each block containing 512 bytes\n", - "File name lenght greater than 256\n", + "File name length greater than 256\n", "Hostname IP is not valid\n", "TFTP server returned file access error\n", "TFTP server returned error signifying that the DISK is full to write\n", @@ -66,11 +66,11 @@ static char *TftpError[] = { "File create error\n", "File write error\n", "Max time expired while waiting for file to be recived\n", - "Error when the received packet is less than 4bytes(error lenght) or greater than 512bytes\n", + "Error when the received packet is less than 4bytes(error length) or greater than 512bytes\n", "Returned by TFTP server for protocol user error\n", "The destination file path length greater than 256\n", "Returned by TFTP server for undefined transfer ID\n", - "IOCTL fucntion failed at TFTP client while setting the socket to non-block\n", + "IOCTL function failed at TFTP client while setting the socket to non-block\n", }; #ifndef ARRAY_SIZE diff --git a/apps/tftp/src/tftpc.c b/apps/tftp/src/tftpc.c index b78bd45fb7c1ef3d16a8efe89b850feece419f16..a1ab6f34da919e2f476984776b9f06aad7188d1e 100644 --- a/apps/tftp/src/tftpc.c +++ b/apps/tftp/src/tftpc.c @@ -189,7 +189,7 @@ u32_t lwip_tftp_recv_from_server(s32_t iSockNum, u32_t *pulSize, TFTPC_PACKET_S if (iRet == -1) { return TFTPC_SELECT_ERROR; } else if (iRet == 0) { - return TFTPC_TIMEOUT_ERROR; /* Select timeout occured */ + return TFTPC_TIMEOUT_ERROR; /* Select timeout occurred */ } if (!FD_ISSET(iSockNum, &stReadfds)) { @@ -218,7 +218,7 @@ u32_t lwip_tftp_recv_from_server(s32_t iSockNum, u32_t *pulSize, TFTPC_PACKET_S usOpcode = ntohs(pstRecvBuf->usOpcode); /* if this packet is ERROR packet */ if (usOpcode == TFTPC_OP_ERROR) { - ulError = ntohs (pstRecvBuf->u.stTFTP_Err.usErrNum); + ulError = ntohs(pstRecvBuf->u.stTFTP_Err.usErrNum); /*If the error is according to RFC,then convert to lwip error codes. Constant values are used in the cases as these error codes are as per @@ -268,7 +268,7 @@ u32_t lwip_tftp_recv_from_server(s32_t iSockNum, u32_t *pulSize, TFTPC_PACKET_S *pulSize = (u32_t)iRet; /* If received packet is first block of data(for get operation) or if - received packet is acknowledgement for write request (put operation) + received packet is acknowledgment for write request (put operation) store the received port number */ if (((usOpcode == TFTPC_OP_DATA) && (ntohs(pstRecvBuf->u.stTFTP_Data.usBlknum) == 1)) || @@ -687,7 +687,7 @@ u32_t lwip_tftp_get_file_by_filename(u32_t ulHostAddr, ulErrCode = lwip_tftp_recv_from_server(iSockNum, &ulRecvSize, pstRecvBuf, &ulIgnorePkt, &stServerAddr, pstSendBuf); - /* If select timeout occured */ + /* If select timeout occurred */ if (ulErrCode == TFTPC_TIMEOUT_ERROR) { ulTotalTime++; if (ulTotalTime < TFTPC_MAX_SEND_REQ_ATTEMPTS) { @@ -727,7 +727,7 @@ u32_t lwip_tftp_get_file_by_filename(u32_t ulHostAddr, } /* if this packet is unkonwn or incorrect packet */ - if (ntohs (pstRecvBuf->usOpcode) != TFTPC_OP_DATA) { + if (ntohs(pstRecvBuf->usOpcode) != TFTPC_OP_DATA) { /* Send error packet to server */ lwip_tftp_send_error(iSockNum, TFTPC_PROTOCOL_PROTO_ERROR, @@ -982,7 +982,7 @@ u32_t lwip_tftp_put_file_by_filename(u32_t ulHostAddr, u16_t usTftpServPort, u8_ return TFTPC_MEMALLOC_ERROR; } - /* First time intialize the buffer */ + /* First time initialize the buffer */ (void)memset_s((void *)pstSendBuf, sizeof(TFTPC_PACKET_S), 0, sizeof(TFTPC_PACKET_S)); /* The destination path can only be one of the following: @@ -1221,7 +1221,7 @@ u32_t lwip_tftp_inner_put_file(s32_t iSockNum, return TFTPC_MEMALLOC_ERROR; } - /* First time intialize the buffer */ + /* First time initialize the buffer */ (void)memset_s((void *)pstRecvBuf, sizeof(TFTPC_PACKET_S), 0, sizeof(TFTPC_PACKET_S)); /* Initialize from address to the server address at first */ @@ -1235,7 +1235,7 @@ u32_t lwip_tftp_inner_put_file(s32_t iSockNum, ulError = lwip_tftp_recv_from_server(iSockNum, &ulPktSize, pstRecvBuf, &ulIgnorePkt, pstServerAddr, pstSendBuf); - /* If select timeout occured */ + /* If select timeout occurred */ if (ulError == TFTPC_TIMEOUT_ERROR) { ulTotalTime++; if (ulTotalTime < TFTPC_MAX_SEND_REQ_ATTEMPTS) { @@ -1526,7 +1526,7 @@ u32_t lwip_tftp_get_file_by_filename_to_rawmem(u32_t ulHostAddr, ulErrCode = lwip_tftp_recv_from_server(iSockNum, &ulRecvSize, pstRecvBuf, &ulIgnorePkt, &stServerAddr, pstSendBuf); - /* If select timeout occured */ + /* If select timeout occurred */ if (ulErrCode == TFTPC_TIMEOUT_ERROR) { ulTotalTime++; if (ulTotalTime < TFTPC_MAX_SEND_REQ_ATTEMPTS) { @@ -1557,7 +1557,7 @@ u32_t lwip_tftp_get_file_by_filename_to_rawmem(u32_t ulHostAddr, } /* if this packet is unkonwn or incorrect packet */ - if (ntohs (pstRecvBuf->usOpcode) != TFTPC_OP_DATA) { + if (ntohs(pstRecvBuf->usOpcode) != TFTPC_OP_DATA) { /* Send error packet to server */ lwip_tftp_send_error(iSockNum, TFTPC_PROTOCOL_PROTO_ERROR, diff --git a/arch/arm/arm/include/los_atomic.h b/arch/arm/arm/include/los_atomic.h index 702ea78ef5165db43dee44b947ad4132c3f4f3d1..6d79cf94c88f3651c7f58c275cee3c97d4b7b5ca 100644 --- a/arch/arm/arm/include/los_atomic.h +++ b/arch/arm/arm/include/los_atomic.h @@ -246,7 +246,7 @@ STATIC INLINE INT32 LOS_AtomicIncRet(Atomic *v) * @brief Atomic auto-decrement. * * @par Description: - * This API is used to implementating the atomic auto-decrement. + * This API is used to implement the atomic auto-decrement. * @attention *