diff --git a/apps/shell/builtin/cd.c b/apps/shell/builtin/cd.c index f1e11949..88e3eb93 100644 --- a/apps/shell/builtin/cd.c +++ b/apps/shell/builtin/cd.c @@ -46,7 +46,7 @@ int Chdir(const char *tgtDir) ret = chdir(tgtDir); if (ret == 0) { - ret = OsShellSetWorkingDirtectory(tgtDir, strlen(tgtDir) + 1); /* 1: the length of '\0' */ + ret = OsShellSetWorkingDirectory(tgtDir, strlen(tgtDir) + 1); /* 1: the length of '\0' */ } return ret; diff --git a/apps/shell/include/shcmd.h b/apps/shell/include/shcmd.h index f5485a2a..d1ab8b1c 100644 --- a/apps/shell/include/shcmd.h +++ b/apps/shell/include/shcmd.h @@ -53,7 +53,7 @@ typedef struct { } CmdKeyLink; #define NEED_NEW_LINE(timesPrint, lineCap) ((timesPrint) % (lineCap) == 0) -#define SCREEN_IS_FULL(timesPrint, lineCap) ((timesPrint) >= ((lineCap) * DEFAULT_SCREEN_HEIGNT)) +#define SCREEN_IS_FULL(timesPrint, lineCap) ((timesPrint) >= ((lineCap) * DEFAULT_SCREEN_HEIGHT)) extern unsigned int OsCmdExec(CmdParsed *cmdParsed, char *cmdStr); extern unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size); @@ -62,7 +62,7 @@ extern void OsShellCmdPush(const char *string, CmdKeyLink *cmdKeyLink); extern void OsShellHistoryShow(unsigned int value, ShellCB *shellCB); extern unsigned int OsShellKeyInit(ShellCB *shellCB); extern void OsShellKeyDeInit(CmdKeyLink *cmdKeyLink); -extern int OsShellSetWorkingDirtectory(const char *dir, size_t len); +extern int OsShellSetWorkingDirectory(const char *dir, size_t len); #ifdef __cplusplus #if __cplusplus diff --git a/apps/shell/include/shell.h b/apps/shell/include/shell.h index d23b9e1b..be1b7888 100644 --- a/apps/shell/include/shell.h +++ b/apps/shell/include/shell.h @@ -54,7 +54,7 @@ extern "C" { #define CMD_HISTORY_LEN 10 #define CMD_MAX_PATH 256 #define DEFAULT_SCREEN_WIDTH 80 -#define DEFAULT_SCREEN_HEIGNT 24 +#define DEFAULT_SCREEN_HEIGHT 24 #define SWITCH_QUOTES_STATUS(qu) do { \ if ((qu) == TRUE) { \ diff --git a/apps/shell/include/show.h b/apps/shell/include/show.h index 252f6ee3..542f27ac 100644 --- a/apps/shell/include/show.h +++ b/apps/shell/include/show.h @@ -42,7 +42,7 @@ extern "C" { #endif /* __cplusplus */ #endif /* __cplusplus */ -extern char *OsShellGetWorkingDirtectory(void); +extern char *OsShellGetWorkingDirectory(void); extern unsigned int OsShellInit(void); extern int OsShellDeinit(ShellCB *shellCB); extern ShellCB *OsGetShellCb(void); diff --git a/apps/shell/src/shcmd.c b/apps/shell/src/shcmd.c index d14d1b98..d8563e3a 100644 --- a/apps/shell/src/shcmd.c +++ b/apps/shell/src/shcmd.c @@ -91,12 +91,12 @@ static int OsStrSeparateTabStrGet(const char **tabStr, CmdParsed *parsed, unsign return SH_OK; } -char *OsShellGetWorkingDirtectory() +char *OsShellGetWorkingDirectory(void) { return OsGetShellCb()->shellWorkingDirectory; } -int OsShellSetWorkingDirtectory(const char *dir, size_t len) +int OsShellSetWorkingDirectory(const char *dir, size_t len) { if (dir == NULL) { return SH_NOK; @@ -115,7 +115,7 @@ static int OsStrSeparate(const char *tabStr, char *strPath, char *nameLooking, u char *strEnd = NULL; char *cutPos = NULL; CmdParsed parsed = {0}; - char *shellWorkingDirectory = OsShellGetWorkingDirtectory(); + char *shellWorkingDirectory = OsShellGetWorkingDirectory(); int ret; ret = OsStrSeparateTabStrGet(&tabStr, &parsed, tabStrLen); @@ -223,7 +223,7 @@ static int OsPrintMatchList(unsigned int count, const char *strPath, const char return (int)SH_ERROR; } - if (count > (lineCap * DEFAULT_SCREEN_HEIGNT)) { + if (count > (lineCap * DEFAULT_SCREEN_HEIGHT)) { ret = OsSurePrintAll(count); if (ret != 1) { return ret; @@ -375,10 +375,10 @@ static int OsTabMatchFile(char *cmdKey, unsigned int *len) } /* - * Description: Pass in the string and clear useless space ,which inlcude: + * 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 vaild charatctor + * 2) Clear all space before first valid charatctor * 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,7 +407,7 @@ 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 invaild charactor */ + /* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invalid charactor */ for (; *cmdKey != '\0'; cmdKey++) { /* Detected a Double Quotes, switch the matching status */ if (*(cmdKey) == '\"') { @@ -417,7 +417,7 @@ unsigned int OsCmdKeyShift(const char *cmdKey, char *cmdOut, unsigned int size) /* 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) Invaild charactor, such as single quotes */ + /* 4) Invalid charactor, such as single quotes */ if ((*cmdKey == ' ') && ((*(cmdKey + 1) == ' ') || (*(cmdKey + 1) == '\0')) && QUOTES_STATUS_CLOSE(quotes)) { continue; } diff --git a/apps/shell/src/shmsg.c b/apps/shell/src/shmsg.c index 320e60b4..ff7417f5 100644 --- a/apps/shell/src/shmsg.c +++ b/apps/shell/src/shmsg.c @@ -133,7 +133,7 @@ int ShellNotify(ShellCB *shellCB) } enum { - STAT_NOMAL_KEY, + STAT_NORMAL_KEY, STAT_ESC_KEY, STAT_MULTI_KEY }; @@ -152,23 +152,23 @@ static int ShellCmdLineCheckUDRL(const char ch, ShellCB *shellCB) } else if (ch == 0x41) { /* up */ if (shellCB->shellKeyType == STAT_MULTI_KEY) { OsShellHistoryShow(CMD_KEY_UP, shellCB); - shellCB->shellKeyType = STAT_NOMAL_KEY; + shellCB->shellKeyType = STAT_NORMAL_KEY; return ret; } } else if (ch == 0x42) { /* down */ if (shellCB->shellKeyType == STAT_MULTI_KEY) { - shellCB->shellKeyType = STAT_NOMAL_KEY; + shellCB->shellKeyType = STAT_NORMAL_KEY; OsShellHistoryShow(CMD_KEY_DOWN, shellCB); return ret; } } else if (ch == 0x43) { /* right */ if (shellCB->shellKeyType == STAT_MULTI_KEY) { - shellCB->shellKeyType = STAT_NOMAL_KEY; + shellCB->shellKeyType = STAT_NORMAL_KEY; return ret; } } else if (ch == 0x44) { /* left */ if (shellCB->shellKeyType == STAT_MULTI_KEY) { - shellCB->shellKeyType = STAT_NOMAL_KEY; + shellCB->shellKeyType = STAT_NORMAL_KEY; return ret; } } @@ -265,7 +265,7 @@ void ParseNormalChar(char ch, OutputFunc outputFunc, ShellCB *shellCB) outputFunc("%c", ch); } - shellCB->shellKeyType = STAT_NOMAL_KEY; + shellCB->shellKeyType = STAT_NORMAL_KEY; } void ShellCmdLineParse(char c, OutputFunc outputFunc, ShellCB *shellCB) @@ -459,7 +459,7 @@ static void ParseAndExecCmdline(CmdParsed *cmdParsed, const char *cmdline, unsig DoCmdExec(cmdName, cmdlineOrigin, len, cmdParsed); if (getcwd(shellWorkingDirectory, PATH_MAX) != NULL) { - (void)OsShellSetWorkingDirtectory(shellWorkingDirectory, (PATH_MAX + 1)); + (void)OsShellSetWorkingDirectory(shellWorkingDirectory, (PATH_MAX + 1)); } OUT: diff --git a/arch/arm/arm/src/los_exc.c b/arch/arm/arm/src/los_exc.c index 9bf61dac..7de69f61 100644 --- a/arch/arm/arm/src/los_exc.c +++ b/arch/arm/arm/src/los_exc.c @@ -244,7 +244,7 @@ UINT32 OsArmSharedPageFault(UINT32 excType, ExcContext *frame, UINT32 far, UINT3 STATIC VOID OsExcType(UINT32 excType, ExcContext *excBufAddr, UINT32 far, UINT32 fsr) { - /* undefinited exception handling or software interrupt */ + /* undefined exception handling or software interrupt */ if ((excType == OS_EXCEPT_UNDEF_INSTR) || (excType == OS_EXCEPT_SWI)) { if ((excBufAddr->regCPSR & INSTR_SET_MASK) == 0) { /* work status: ARM */ excBufAddr->PC = excBufAddr->PC - ARM_INSTR_LEN; @@ -479,7 +479,7 @@ STATIC VOID OsDumpProcessUsedMemRegion(LosProcessCB *runProcess, LosVmSpace *run RB_SCAN_SAFE_END(&space->regionRbTree, pstRbNodeTemp, pstRbNodeNext) } -STATIC VOID OsDumpProcessUsedMemNode(UINT16 vmmFalgs) +STATIC VOID OsDumpProcessUsedMemNode(UINT16 vmmFlags) { LosProcessCB *runProcess = NULL; LosVmSpace *runspace = NULL; @@ -500,7 +500,7 @@ STATIC VOID OsDumpProcessUsedMemNode(UINT16 vmmFalgs) return; } - OsDumpProcessUsedMemRegion(runProcess, runspace, vmmFalgs); + OsDumpProcessUsedMemRegion(runProcess, runspace, vmmFlags); return; } #endif @@ -1048,7 +1048,7 @@ STATIC VOID OsCheckAllCpuStatus(VOID) LOCKDEP_CLEAR_LOCKS(); LOS_SpinLock(&g_excSerializerSpin); - /* Only the current nuclear anomaly */ + /* Only the current CPU anomaly */ if (g_currHandleExcCpuID == INVALID_CPUID) { g_currHandleExcCpuID = currCpuID; g_currHandleExcPID = OsCurrProcessGet()->processID; diff --git a/arch/arm/gic/gic_v2.c b/arch/arm/gic/gic_v2.c index e415c8e8..57e9b380 100644 --- a/arch/arm/gic/gic_v2.c +++ b/arch/arm/gic/gic_v2.c @@ -172,7 +172,7 @@ VOID HalIrqHandler(VOID) OsInterrupt(vector); - /* use orignal iar to do the EOI */ + /* use original iar to do the EOI */ GIC_REG_32(GICC_EOIR) = iar; } diff --git a/drivers/block/disk/src/disk.c b/drivers/block/disk/src/disk.c index fc3eb01e..6bec0eac 100644 --- a/drivers/block/disk/src/disk.c +++ b/drivers/block/disk/src/disk.c @@ -998,7 +998,7 @@ INT32 los_part_read(INT32 pt, VOID *buf, UINT64 sector, UINT32 count, BOOL useRe } if (count > part->sector_count) { - PRINT_ERR("los_part_read failed, invaild count, count = %u\n", count); + PRINT_ERR("los_part_read failed, invalid count, count = %u\n", count); goto ERROR_HANDLE; } @@ -1007,7 +1007,7 @@ INT32 los_part_read(INT32 pt, VOID *buf, UINT64 sector, UINT32 count, BOOL useRe if ((disk->sector_count - part->sector_start) > sector) { sector += part->sector_start; } else { - PRINT_ERR("los_part_read failed, invaild sector, sector = %llu\n", sector); + PRINT_ERR("los_part_read failed, invalid sector, sector = %llu\n", sector); goto ERROR_HANDLE; } } @@ -1054,7 +1054,7 @@ INT32 los_part_write(INT32 pt, const VOID *buf, UINT64 sector, UINT32 count) } if (count > part->sector_count) { - PRINT_ERR("los_part_write failed, invaild count, count = %u\n", count); + PRINT_ERR("los_part_write failed, invalid count, count = %u\n", count); goto ERROR_HANDLE; } @@ -1063,7 +1063,7 @@ INT32 los_part_write(INT32 pt, const VOID *buf, UINT64 sector, UINT32 count) if ((disk->sector_count - part->sector_start) > sector) { sector += part->sector_start; } else { - PRINT_ERR("los_part_write failed, invaild sector, sector = %llu\n", sector); + PRINT_ERR("los_part_write failed, invalid sector, sector = %llu\n", sector); goto ERROR_HANDLE; } } diff --git a/fs/fat/Kconfig b/fs/fat/Kconfig index 4ee52bde..6d7060fa 100644 --- a/fs/fat/Kconfig +++ b/fs/fat/Kconfig @@ -27,7 +27,7 @@ config FS_FAT_CHINESE Answer Y to enable LiteOS fat filesystem support Chinese. config FS_FAT_VIRTUAL_PARTITION - bool "Enabel Virtual Partition" + bool "Enable Virtual Partition" default n depends on FS_FAT diff --git a/fs/fat/virpart/src/virpart.c b/fs/fat/virpart/src/virpart.c index 87372d83..7f4e2154 100644 --- a/fs/fat/virpart/src/virpart.c +++ b/fs/fat/virpart/src/virpart.c @@ -267,7 +267,7 @@ static FRESULT FatfsScanClear(INT vol) * Acceptable Return Value: * - FR_OK : The root directory is completely clean. * - FR_OCCUPIED : The virtual partition entry has been occupied by the same name file. - * - FR_CHAIN_ERR : The virtual partition entry has been rebuilt along the invaild cluster + * - FR_CHAIN_ERR : The virtual partition entry has been rebuilt along the invalid cluster * chain. * Others Return Value: * Followed the by the lower API diff --git a/fs/fat/virpart/src/virpartff.c b/fs/fat/virpart/src/virpartff.c index 066ba2e7..017e6dc9 100644 --- a/fs/fat/virpart/src/virpartff.c +++ b/fs/fat/virpart/src/virpartff.c @@ -53,7 +53,7 @@ extern FATFS *FatFs[FF_VOLUMES]; * follow_virentry: * Compare the top segment with the virtual partition entry and replace it to its CHILD FATFS * -* Acceptable return vaule: +* Acceptable return value: * - FR_OK : The top segment matches one of the virtual partition entries, and the FATFS * has been replaced to the corresponding FATFS. * - FR_DENIED : The top segment does not matched any of the virtual partition entries, and @@ -291,7 +291,7 @@ static void FatfsSetParentFs(FATFS *pfs, FATFS *fs) * - FR_DENIED : The virtual partition feature has been shut down by switcher * - FR_DISK_ERR : A disk error happened * - FR_NOT_ENOUGH_CORE : Not enough memory for allocate space for CHILD FATFS -* - FR_INVALID_PARAMETER : There is a invaild value in current setting +* - FR_INVALID_PARAMETER : There is a invalid value in current setting */ FRESULT f_regvirfs(FATFS *fs) { @@ -507,7 +507,7 @@ static void FatfsSetChildClst(BYTE *work, FATFS *fs, WORD i) * - FR_INVAILD_FATFS : The FATFS object has error or the info in it has been occuried * - FR_DENIED : The virtual partition feature has been shut down by switcher * - FR_INVALID_DRIVE : The drive index is error -* - FR_DISK_ERR : A Disk error happend +* - FR_DISK_ERR : A Disk error happened */ FRESULT f_checkvirpart(FATFS *fs, const TCHAR *path, BYTE vol) { @@ -663,7 +663,7 @@ static void FatfsClacPartInfo(FATFS *fs, DOUBLE virpartper, UINT i) * - FR_INVAILD_FATFS : The FATFS object has error or the info in it has been occuried * - FR_DENIED : The virtual partition feature has been shut down by switcher * - FR_INVALID_DRIVE : The drive index is error -* - FR_DISK_ERR : A Disk error happend +* - FR_DISK_ERR : A Disk error happened */ FRESULT f_makevirpart(FATFS *fs, const TCHAR *path, BYTE vol) { @@ -797,7 +797,7 @@ FRESULT f_getvirfree(const TCHAR *path, DWORD *nclst, DWORD *cclst) /* If current FATFS is a CHILD FATFS */ if (ISCHILD(fs)) { - /* If CHILD FATFS' free_clst is invaild, the scan the FAT and update it */ + /* If CHILD FATFS' free_clst is invalid, the scan the FAT and update it */ if (fs->free_clst > fs->ct_clst) { dj.obj.fs = fs; fs->free_clst = fs->ct_clst; diff --git a/fs/include/vfs_config.h b/fs/include/vfs_config.h index 48909065..eded5bad 100644 --- a/fs/include/vfs_config.h +++ b/fs/include/vfs_config.h @@ -44,14 +44,14 @@ extern "C" { #define PATH_MAX 256 #define CONFIG_DISABLE_MQUEUE // disable posix mqueue inode configure -/* file system configur */ +/* file system config */ #define CONFIG_FS_WRITABLE // enable file system can be written #define CONFIG_FS_READABLE // enable file system can be read #define CONFIG_DEBUG_FS // enable vfs debug function -/* fatfs cache configur */ +/* fatfs cache config */ /* config block size for fat file system, only can be 0,32,64,128,256,512,1024 */ #define CONFIG_FS_FAT_SECTOR_PER_BLOCK 64 diff --git a/fs/vfs/vfs_cmd/vfs_shellcmd.c b/fs/vfs/vfs_cmd/vfs_shellcmd.c index a591d2d6..77cad26d 100644 --- a/fs/vfs/vfs_cmd/vfs_shellcmd.c +++ b/fs/vfs/vfs_cmd/vfs_shellcmd.c @@ -84,7 +84,7 @@ int osShellCmdDoChdir(const char *path) char *fullpath = NULL; char *fullpath_bak = NULL; int ret; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -136,7 +136,7 @@ int osShellCmdLs(int argc, const char **argv) char *fullpath = NULL; const char *filename = NULL; int ret; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -182,7 +182,7 @@ int osShellCmdDoCatShow(UINTPTR arg) { int ret = 0; char buf[CAT_BUF_SIZE]; - size_t size, writen, toWrite; + size_t size, written, toWrite; ssize_t cnt; char *fullpath = (char *)arg; FILE *ini = NULL; @@ -207,9 +207,9 @@ int osShellCmdDoCatShow(UINTPTR arg) goto out_with_fclose; } - for (toWrite = size, writen = 0; toWrite > 0;) + for (toWrite = size, written = 0; toWrite > 0;) { - cnt = write(1, buf + writen, toWrite); + cnt = write(1, buf + written, toWrite); if (cnt == 0) { /* avoid task-starvation */ @@ -222,7 +222,7 @@ int osShellCmdDoCatShow(UINTPTR arg) break; } - writen += cnt; + written += cnt; toWrite -= cnt; } } @@ -243,7 +243,7 @@ int osShellCmdCat(int argc, const char **argv) unsigned int ca_task; struct Vnode *vnode = NULL; TSK_INIT_PARAM_S init_param; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -329,7 +329,7 @@ int osShellCmdMount(int argc, const char **argv) char *data = NULL; char *filessystemtype = NULL; unsigned long mountfalgs; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -461,7 +461,7 @@ int osShellCmdUmount(int argc, const char **argv) char *target_path = NULL; int cmp_num; char *work_path = NULL; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -506,7 +506,7 @@ int osShellCmdMkdir(int argc, const char **argv) int ret; char *fullpath = NULL; const char *filename = NULL; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -531,7 +531,7 @@ int osShellCmdPwd(int argc, const char **argv) { char buf[SHOW_MAX_LEN] = {0}; DIR *dir = NULL; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -577,7 +577,7 @@ int osShellCmdStatfs(int argc, const char **argv) unsigned long long total_size, free_size; char *fullpath = NULL; const char *filename = NULL; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -618,7 +618,7 @@ int osShellCmdTouch(int argc, const char **argv) int fd = -1; char *fullpath = NULL; const char *filename = NULL; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -659,7 +659,7 @@ static int os_shell_cmd_do_cp(const char *src_filepath, const char *dst_filename int dst_fd = -1; struct stat stat_buf; mode_t src_mode; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -1162,7 +1162,7 @@ int osShellCmdCp(int argc, const char **argv) char *dst_fullpath = NULL; struct stat stat_buf; int count = 0; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -1266,7 +1266,7 @@ int osShellCmdRm(int argc, const char **argv) int ret = 0; char *fullpath = NULL; const char *filename = NULL; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -1319,7 +1319,7 @@ int osShellCmdRmdir(int argc, const char **argv) int ret; char *fullpath = NULL; const char *filename = NULL; - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -1450,7 +1450,7 @@ int osShellCmdChmod(int argc, const char **argv) } filename = argv[1]; - shell_working_directory = OsShellGetWorkingDirtectory(); + shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -1509,7 +1509,7 @@ int osShellCmdChown(int argc, const char **argv) attr.attr_chg_valid |= CHG_UID; } - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; @@ -1547,7 +1547,7 @@ int osShellCmdChgrp(int argc, const char **argv) attr.attr_chg_valid |= CHG_GID; } - char *shell_working_directory = OsShellGetWorkingDirtectory(); + char *shell_working_directory = OsShellGetWorkingDirectory(); if (shell_working_directory == NULL) { return -1; } diff --git a/kernel/Kconfig b/kernel/Kconfig index d7ae388c..bd75e235 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -6,11 +6,11 @@ config KERNEL_SMP This option will enable smp support of LiteOS. config KERNEL_SMP_CORE_NUM - int "Muti-processing Core Numbers" + int "Multi-processing Core Numbers" default 2 depends on KERNEL_SMP help - This represents the number of muti-processing cores. + This represents the number of multi-processing cores. config KERNEL_SMP_LOCKDEP bool "Enable Spinlock Lockdep Check" @@ -38,7 +38,7 @@ config KERNEL_SCHED_STATISTICS default n depends on KERNEL_SMP help - This option will enable schedulder statistics. + This option will enable scheduler statistics. config KERNEL_MMU bool "Enable MMU" diff --git a/kernel/base/core/los_task.c b/kernel/base/core/los_task.c index 3b804b76..fc125597 100644 --- a/kernel/base/core/los_task.c +++ b/kernel/base/core/los_task.c @@ -505,7 +505,7 @@ LITE_OS_SEC_TEXT VOID OsTaskResourcesToFree(LosTaskCB *taskCB) LOS_ASSERT(!(processCB->vmSpace == NULL)); UINT32 ret = OsUnMMap(processCB->vmSpace, (UINTPTR)mapBase, mapSize); if ((ret != LOS_OK) && (mapBase != 0) && !(processCB->processStatus & OS_PROCESS_STATUS_INIT)) { - PRINT_ERR("process(%u) ummap user task(%u) stack failed! mapbase: 0x%x size :0x%x, error: %d\n", + PRINT_ERR("process(%u) unmmap user task(%u) stack failed! mapbase: 0x%x size :0x%x, error: %d\n", processCB->processID, taskCB->taskID, mapBase, mapSize, ret); } diff --git a/kernel/base/include/los_percpu_pri.h b/kernel/base/include/los_percpu_pri.h index c4bdd2b6..e63aa450 100644 --- a/kernel/base/include/los_percpu_pri.h +++ b/kernel/base/include/los_percpu_pri.h @@ -56,11 +56,11 @@ typedef struct { SPIN_LOCK_S taskSortLinkSpin; /* task sort link spin lock */ SortLinkAttribute swtmrSortLink; /* swtmr sort link */ SPIN_LOCK_S swtmrSortLinkSpin; /* swtmr sort link spin lock */ - UINT64 responseTime; /* Response time for current nuclear Tick interrupts */ + UINT64 responseTime; /* Response time for current CPU tick interrupts */ UINT64 tickStartTime; /* The time when the tick interrupt starts processing */ - UINT32 responseID; /* The response ID of the current nuclear TICK interrupt */ + UINT32 responseID; /* The response ID of the current CPU tick interrupt */ UINTPTR runProcess; /* The address of the process control block pointer to which - the current kernel is running */ + the current CPU is running */ UINT32 idleTaskID; /* idle task id */ UINT32 taskLockCnt; /* task lock flag */ UINT32 swtmrHandlerQueue; /* software timer timeout queue id */ diff --git a/kernel/base/ipc/los_sem_debug.c b/kernel/base/ipc/los_sem_debug.c index 5321a765..733974dc 100644 --- a/kernel/base/ipc/los_sem_debug.c +++ b/kernel/base/ipc/los_sem_debug.c @@ -78,7 +78,7 @@ STATIC VOID OsSemPendedTaskNamePrint(LosSemCB *semNode) #ifdef LOSCFG_DEBUG_SEMAPHORE typedef struct { - UINT16 origSemCount; /* Number of orignal available semaphores */ + UINT16 origSemCount; /* Number of original available semaphores */ UINT64 lastAccessTime; /* The last operation time */ TSK_ENTRY_FUNC creater; /* The task entry who created this sem */ } SemDebugCB; @@ -235,7 +235,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID) return LOS_OK; } else { if (GET_SEM_INDEX(semID) >= LOSCFG_BASE_IPC_SEM_LIMIT) { - PRINTK("\nInvalid semphore id!\n"); + PRINTK("\nInvalid semaphore id!\n"); return LOS_OK; } @@ -244,7 +244,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID) (VOID)memcpy_s(&semNode, sizeof(LosSemCB), semCB, sizeof(LosSemCB)); SCHEDULER_UNLOCK(intSave); if ((semNode.semID != semID) || (semNode.semStat != OS_SEM_USED)) { - PRINTK("\nThe semphore is not in use!\n"); + PRINTK("\nThe semaphore is not in use!\n"); return LOS_OK; } @@ -252,7 +252,7 @@ STATIC UINT32 OsSemInfoOutput(size_t semID) PRINTK(" 0x%08x 0x%u\n", semNode.semID, semNode.semCount); if (LOS_ListEmpty(&semNode.semList)) { - PRINTK("No task is pended on this semphore!\n"); + PRINTK("No task is pended on this semaphore!\n"); return LOS_OK; } else { OsSemPendedTaskNamePrint(semCB); diff --git a/kernel/base/ipc/los_signal.c b/kernel/base/ipc/los_signal.c index df8bfd53..3a4eb579 100644 --- a/kernel/base/ipc/los_signal.c +++ b/kernel/base/ipc/los_signal.c @@ -555,7 +555,7 @@ int OsSigTimedWaitNoLock(sigset_t *set, siginfo_t *info, unsigned int timeout) if (sigcb->waitList.pstNext == NULL) { LOS_ListInit(&sigcb->waitList); } - /* If pendingflag & set > 0, shound clear pending flag */ + /* If pendingflag & set > 0, should clear pending flag */ sigset_t clear = sigcb->sigPendFlag & *set; if (clear) { sigcb->sigPendFlag ^= clear; diff --git a/kernel/base/mp/los_lockdep.c b/kernel/base/mp/los_lockdep.c index f5c70d72..93e7ddc0 100644 --- a/kernel/base/mp/los_lockdep.c +++ b/kernel/base/mp/los_lockdep.c @@ -189,7 +189,7 @@ STATIC BOOL OsLockDepCheckDependancy(const LosTaskCB *current, LosTaskCB *lockOw VOID OsLockDepCheckIn(SPIN_LOCK_S *lock) { UINT32 intSave; - enum LockDepErrType checkResult = LOCKDEP_SUCEESS; + enum LockDepErrType checkResult = LOCKDEP_SUCCESS; #ifdef LOSCFG_COMPILER_CLANG_LLVM VOID *requestAddr = (VOID *)__builtin_return_address(1); #else @@ -223,10 +223,10 @@ VOID OsLockDepCheckIn(SPIN_LOCK_S *lock) } OUT: - if (checkResult == LOCKDEP_SUCEESS) { + if (checkResult == LOCKDEP_SUCCESS) { /* * though the check may succeed, the waitLock still need to be set. - * because the OsLockDepCheckIn and OsLockDepRecord is not strictly muti-core + * because the OsLockDepCheckIn and OsLockDepRecord is not strictly multi-core * sequential, there would be more than two tasks can pass the checking, but * only one task can successfully obtain the lock. */ @@ -275,7 +275,7 @@ VOID OsLockDepCheckOut(SPIN_LOCK_S *lock) { UINT32 intSave; INT32 depth; - enum LockDepErrType checkResult = LOCKDEP_SUCEESS; + enum LockDepErrType checkResult = LOCKDEP_SUCCESS; #ifdef LOSCFG_COMPILER_CLANG_LLVM VOID *requestAddr = (VOID *)__builtin_return_address(1); #else diff --git a/kernel/base/vm/los_vm_fault.c b/kernel/base/vm/los_vm_fault.c index d6d9ab64..07280f4f 100644 --- a/kernel/base/vm/los_vm_fault.c +++ b/kernel/base/vm/los_vm_fault.c @@ -140,7 +140,7 @@ STATIC STATUS_T OsDoReadFault(LosVmMapRegion *region, LosVmPgFault *vmPgFault) return LOS_ERRNO_VM_NO_MEMORY; } -/* unmap a page when cow happend only */ +/* unmap a page when cow happened only */ STATIC LosVmPage *OsCowUnmapOrg(LosArchMmu *archMmu, LosVmMapRegion *region, LosVmPgFault *vmf) { UINT32 intSave; diff --git a/kernel/base/vm/los_vm_filemap.c b/kernel/base/vm/los_vm_filemap.c index 78ad60ac..9d34aeec 100644 --- a/kernel/base/vm/los_vm_filemap.c +++ b/kernel/base/vm/los_vm_filemap.c @@ -141,9 +141,9 @@ LosMapInfo *OsGetMapInfo(LosFilePage *page, LosArchMmu *archMmu, VADDR_T vaddr) VOID OsDeletePageCacheLru(LosFilePage *page) { - /* delete form lru list */ + /* delete from lru list */ OsLruCacheDel(page); - /* delete from cache lits and free pmm if need */ + /* delete from cache list and free pmm if needed */ OsPageCacheDel(page); } @@ -155,7 +155,7 @@ STATIC VOID OsPageCacheUnmap(LosFilePage *fpage, LosArchMmu *archMmu, VADDR_T va LOS_SpinLockSave(&fpage->physSeg->lruLock, &intSave); info = OsGetMapInfo(fpage, archMmu, vaddr); if (info == NULL) { - VM_ERR("OsPageCacheUnmap get map info fail!"); + VM_ERR("OsPageCacheUnmap get map info failed!"); } else { OsUnmapPageLocked(fpage, info); } diff --git a/kernel/base/vm/los_vm_iomap.c b/kernel/base/vm/los_vm_iomap.c index 5acc88fd..a313da14 100644 --- a/kernel/base/vm/los_vm_iomap.c +++ b/kernel/base/vm/los_vm_iomap.c @@ -46,7 +46,7 @@ VOID *LOS_DmaMemAlloc(DMA_ADDR_T *dmaAddr, size_t size, size_t align, enum DmaMe } if ((type != DMA_CACHE) && (type != DMA_NOCACHE)) { - VM_ERR("The dma type = %d is not support!", type); + VM_ERR("The dma type = %d is not supported!", type); return NULL; } diff --git a/kernel/base/vm/los_vm_scan.c b/kernel/base/vm/los_vm_scan.c index 0975baaa..c4c9841b 100644 --- a/kernel/base/vm/los_vm_scan.c +++ b/kernel/base/vm/los_vm_scan.c @@ -217,7 +217,7 @@ VOID OsShrinkActiveList(LosVmPhysSeg *physSeg, int nScan) continue; } - /* happend when caller hold cache lock and try reclaim this page */ + /* happened when caller hold cache lock and try reclaim this page */ if (OsIsPageLocked(fpage->vmPage)) { LOS_SpinUnlock(&fpage->mapping->list_lock); continue; diff --git a/kernel/common/console.c b/kernel/common/console.c index 1eb47103..2fbcfc14 100644 --- a/kernel/common/console.c +++ b/kernel/common/console.c @@ -95,7 +95,7 @@ INT32 GetFilepOps(const struct file *filep, struct file **privFilep, const struc goto ERROUT; } - /* to find uart driver operation function throutht u.i_opss */ + /* to find uart driver operation function through u.i_opss */ drv = (struct drv_data *)(*privFilep)->f_vnode->data; @@ -363,7 +363,7 @@ STATIC INLINE VOID UserEndOfRead(CONSOLE_CB *consoleCB, struct file *filep, } enum { - STAT_NOMAL_KEY, + STAT_NORMAL_KEY, STAT_ESC_KEY, STAT_MULTI_KEY }; @@ -381,22 +381,22 @@ STATIC INT32 UserShellCheckUDRL(const CHAR ch, INT32 *lastTokenType) } } else if (ch == 0x41) { /* up */ if (*lastTokenType == STAT_MULTI_KEY) { - *lastTokenType = STAT_NOMAL_KEY; + *lastTokenType = STAT_NORMAL_KEY; return ret; } } else if (ch == 0x42) { /* down */ if (*lastTokenType == STAT_MULTI_KEY) { - *lastTokenType = STAT_NOMAL_KEY; + *lastTokenType = STAT_NORMAL_KEY; return ret; } } else if (ch == 0x43) { /* right */ if (*lastTokenType == STAT_MULTI_KEY) { - *lastTokenType = STAT_NOMAL_KEY; + *lastTokenType = STAT_NORMAL_KEY; return ret; } } else if (ch == 0x44) { /* left */ if (*lastTokenType == STAT_MULTI_KEY) { - *lastTokenType = STAT_NOMAL_KEY; + *lastTokenType = STAT_NORMAL_KEY; return ret; } } @@ -458,7 +458,7 @@ STATIC INT32 UserFilepRead(CONSOLE_CB *consoleCB, struct file *filep, const stru INT32 ret; INT32 needreturn = LOS_NOK; CHAR ch; - INT32 lastTokenType = STAT_NOMAL_KEY; + INT32 lastTokenType = STAT_NORMAL_KEY; if (fops->read == NULL) { return -EFAULT; @@ -504,7 +504,7 @@ STATIC INT32 UserFilepRead(CONSOLE_CB *consoleCB, struct file *filep, const stru break; } } else { - /* if data is already in console fifo, we returen them immediately */ + /* if data is already in console fifo, we return them immediately */ ret = ConsoleReadFifo(buffer, consoleCB, bufLen); } @@ -738,7 +738,7 @@ ERROUT: STATIC ssize_t DoWrite(CirBufSendCB *cirBufSendCB, CHAR *buffer, size_t bufLen) { INT32 cnt; - size_t writen = 0; + size_t written = 0; size_t toWrite = bufLen; UINT32 intSave; @@ -749,18 +749,18 @@ STATIC ssize_t DoWrite(CirBufSendCB *cirBufSendCB, CHAR *buffer, size_t bufLen) } #endif LOS_CirBufLock(&cirBufSendCB->cirBufCB, &intSave); - while (writen < (INT32)bufLen) { + while (written < (INT32)bufLen) { /* Transform for CR/LR mode */ - if ((buffer[writen] == '\n') || (buffer[writen] == '\r')) { + if ((buffer[written] == '\n') || (buffer[written] == '\r')) { (VOID)LOS_CirBufWrite(&cirBufSendCB->cirBufCB, "\r", 1); } - cnt = LOS_CirBufWrite(&cirBufSendCB->cirBufCB, &buffer[writen], 1); + cnt = LOS_CirBufWrite(&cirBufSendCB->cirBufCB, &buffer[written], 1); if (cnt <= 0) { break; } toWrite -= cnt; - writen += cnt; + written += cnt; } LOS_CirBufUnlock(&cirBufSendCB->cirBufCB, intSave); /* Log is cached but not printed when a system exception occurs */ @@ -768,7 +768,7 @@ STATIC ssize_t DoWrite(CirBufSendCB *cirBufSendCB, CHAR *buffer, size_t bufLen) (VOID)LOS_EventWrite(&cirBufSendCB->sendEvent, CONSOLE_CIRBUF_EVENT); } - return writen; + return written; } STATIC ssize_t ConsoleWrite(struct file *filep, const CHAR *buffer, size_t bufLen) diff --git a/kernel/common/los_config.h b/kernel/common/los_config.h index 5e787d18..974947ae 100644 --- a/kernel/common/los_config.h +++ b/kernel/common/los_config.h @@ -122,7 +122,7 @@ extern UINT32 __heap_end; /** * @ingroup los_config - * Sched clck interval + * Sched clock interval */ #define SCHED_CLOCK_INTETRVAL_TICKS LOSCFG_BASE_CORE_TICK_PER_SECOND @@ -405,7 +405,7 @@ extern UINT32 __heap_end; * * @par Description: * * @attention *