/kernel/liteos_a/apps/shell/src/ |
D | shcmdparse.c | 73 unsigned int OsCmdParseOneToken(CmdParsed *cmdParsed, unsigned int index, const char *token) in OsCmdParseOneToken() argument 78 if (cmdParsed == NULL) { in OsCmdParseOneToken() 83 if (cmdParsed->cmdType != CMD_TYPE_STD) { in OsCmdParseOneToken() 88 if ((token != NULL) && (cmdParsed->paramCnt < CMD_MAX_PARAS)) { in OsCmdParseOneToken() 89 tempLen = cmdParsed->paramCnt; in OsCmdParseOneToken() 90 ret = OsCmdParseParaGet(&(cmdParsed->paramArray[tempLen]), token); in OsCmdParseOneToken() 94 cmdParsed->paramCnt++; in OsCmdParseOneToken() 99 unsigned int OsCmdTokenSplit(char *cmdStr, char split, CmdParsed *cmdParsed) in OsCmdTokenSplit() argument 125 ret = OsCmdParseOneToken(cmdParsed, count++, token); in OsCmdTokenSplit() 141 ret = OsCmdParseOneToken(cmdParsed, count, token); in OsCmdTokenSplit() [all …]
|
D | shmsg.c | 308 unsigned int ShellMsgNameGet(CmdParsed *cmdParsed, const char *cmdType) in ShellMsgNameGet() argument 310 (void)cmdParsed; in ShellMsgNameGet() 385 int CheckExit(const char *cmdName, const CmdParsed *cmdParsed) in CheckExit() argument 393 if (cmdParsed->paramCnt > 1) { in CheckExit() 397 if (cmdParsed->paramCnt == 1) { in CheckExit() 399 ret = strtol(cmdParsed->paramArray[0], &p, CMD_EXIT_CODE_BASE_DEC); in CheckExit() 401 printf("exit: bad number: %s\n", cmdParsed->paramArray[0]); in CheckExit() 409 …ic void DoCmdExec(const char *cmdName, const char *cmdline, unsigned int len, CmdParsed *cmdParsed) in DoCmdExec() argument 416 …if ((cmdParsed->paramCnt > 1) && (strcmp(cmdParsed->paramArray[cmdParsed->paramCnt - 1], "&") == 0… in DoCmdExec() 417 free(cmdParsed->paramArray[cmdParsed->paramCnt - 1]); in DoCmdExec() [all …]
|
D | shcmd.c | 42 static void OsFreeCmdPara(CmdParsed *cmdParsed) in OsFreeCmdPara() argument 45 for (i = 0; i < cmdParsed->paramCnt; i++) { in OsFreeCmdPara() 46 if ((cmdParsed->paramArray[i]) != NULL) { in OsFreeCmdPara() 47 free((cmdParsed->paramArray[i])); in OsFreeCmdPara() 48 cmdParsed->paramArray[i] = NULL; in OsFreeCmdPara() 585 unsigned int OsCmdExec(CmdParsed *cmdParsed, char *cmdStr) in OsCmdExec() argument 588 if (cmdParsed && cmdStr) { in OsCmdExec()
|
/kernel/liteos_a/shell/full/src/base/ |
D | shcmdparse.c | 74 LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdParseOneToken(CmdParsed *cmdParsed, UINT32 index, const CHAR *to… in OsCmdParseOneToken() argument 79 if (cmdParsed == NULL) { in OsCmdParseOneToken() 84 if (cmdParsed->cmdType != CMD_TYPE_STD) { in OsCmdParseOneToken() 89 if ((token != NULL) && (cmdParsed->paramCnt < CMD_MAX_PARAS)) { in OsCmdParseOneToken() 90 tempLen = cmdParsed->paramCnt; in OsCmdParseOneToken() 91 ret = OsCmdParseParaGet(&(cmdParsed->paramArray[tempLen]), token); in OsCmdParseOneToken() 95 cmdParsed->paramCnt++; in OsCmdParseOneToken() 100 LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdTokenSplit(CHAR *cmdStr, CHAR split, CmdParsed *cmdParsed) in OsCmdTokenSplit() argument 126 ret = OsCmdParseOneToken(cmdParsed, count++, token); in OsCmdTokenSplit() 142 ret = OsCmdParseOneToken(cmdParsed, count, token); in OsCmdTokenSplit() [all …]
|
D | shcmd.c | 57 STATIC VOID OsFreeCmdPara(CmdParsed *cmdParsed) in OsFreeCmdPara() argument 60 for (i = 0; i < cmdParsed->paramCnt; i++) { in OsFreeCmdPara() 61 if ((cmdParsed->paramArray[i]) != NULL) { in OsFreeCmdPara() 62 (VOID)LOS_MemFree(m_aucSysMem0, (cmdParsed->paramArray[i])); in OsFreeCmdPara() 63 cmdParsed->paramArray[i] = NULL; in OsFreeCmdPara() 737 LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdExec(CmdParsed *cmdParsed, CHAR *cmdStr) in OsCmdExec() argument 745 if ((cmdParsed == NULL) || (cmdStr == NULL) || (strlen(cmdStr) == 0)) { in OsCmdExec() 749 ret = OsCmdParse(cmdStr, cmdParsed); in OsCmdExec() 756 if ((cmdParsed->cmdType == curCmdItem->cmd->cmdType) && in OsCmdExec() 757 (strlen(cmdKey) == strlen(cmdParsed->cmdKeyword)) && in OsCmdExec() [all …]
|
D | shmsg.c | 206 LITE_OS_SEC_TEXT_MINOR UINT32 ShellMsgTypeGet(CmdParsed *cmdParsed, const CHAR *cmdType) in ShellMsgTypeGet() argument 213 if ((cmdParsed == NULL) || (cmdType == NULL)) { in ShellMsgTypeGet() 222 (VOID)memcpy_s((CHAR *)(cmdParsed->cmdKeyword), CMD_KEY_LEN, cmdType, minLen); in ShellMsgTypeGet() 223 cmdParsed->cmdType = curCmdItem->cmd->cmdType; in ShellMsgTypeGet() 231 STATIC UINT32 ShellMsgNameGetAndExec(CmdParsed *cmdParsed, const CHAR *output, UINT32 len) in ShellMsgNameGetAndExec() argument 262 ret = ShellMsgTypeGet(cmdParsed, msgName); in ShellMsgNameGetAndExec() 267 (VOID)OsCmdExec(cmdParsed, (CHAR *)output); in ShellMsgNameGetAndExec() 277 CmdParsed cmdParsed; in ShellMsgParse() local 315 (VOID)memset_s(&cmdParsed, sizeof(CmdParsed), 0, sizeof(CmdParsed)); in ShellMsgParse() 317 ret = ShellMsgNameGetAndExec(&cmdParsed, output, len); in ShellMsgParse()
|
/kernel/liteos_m/components/shell/src/base/ |
D | shcmdparse.c | 74 LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdParseOneToken(CmdParsed *cmdParsed, UINT32 index, const CHAR *to… in OsCmdParseOneToken() argument 79 if (cmdParsed == NULL) { in OsCmdParseOneToken() 84 if (cmdParsed->cmdType != CMD_TYPE_STD) { in OsCmdParseOneToken() 89 if ((token != NULL) && (cmdParsed->paramCnt < CMD_MAX_PARAS)) { in OsCmdParseOneToken() 90 tempLen = cmdParsed->paramCnt; in OsCmdParseOneToken() 91 ret = OsCmdParseParaGet(&(cmdParsed->paramArray[tempLen]), token); in OsCmdParseOneToken() 95 cmdParsed->paramCnt++; in OsCmdParseOneToken() 100 LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdTokenSplit(CHAR *cmdStr, CHAR split, CmdParsed *cmdParsed) in OsCmdTokenSplit() argument 126 ret = OsCmdParseOneToken(cmdParsed, count++, token); in OsCmdTokenSplit() 142 ret = OsCmdParseOneToken(cmdParsed, count, token); in OsCmdTokenSplit() [all …]
|
D | shmsg.c | 47 UINT32 ShellMsgTypeGet(CmdParsed *cmdParsed, const CHAR *cmdType) in ShellMsgTypeGet() argument 54 if ((cmdParsed == NULL) || (cmdType == NULL)) { in ShellMsgTypeGet() 63 (VOID)memcpy_s((CHAR *)(cmdParsed->cmdKeyword), CMD_KEY_LEN, cmdType, minLen); in ShellMsgTypeGet() 64 cmdParsed->cmdType = curCmdItem->cmd->cmdType; in ShellMsgTypeGet() 145 STATIC VOID ParseAndExecCmdline(CmdParsed *cmdParsed, const CHAR *cmdline, UINT32 len) in ParseAndExecCmdline() argument 157 ret = ShellMsgTypeGet(cmdParsed, cmdName); in ParseAndExecCmdline() 164 ret = OsCmdParse((CHAR *)cmdline, cmdParsed); in ParseAndExecCmdline() 170 (VOID)OsCmdExec(cmdParsed); in ParseAndExecCmdline() 173 for (i = 0; i < cmdParsed->paramCnt; i++) { in ParseAndExecCmdline() 174 if (cmdParsed->paramArray[i] != NULL) { in ParseAndExecCmdline() [all …]
|
D | shcmd.c | 311 LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdExec(CmdParsed *cmdParsed) in OsCmdExec() argument 319 if (cmdParsed == NULL) { in OsCmdExec() 325 if ((cmdParsed->cmdType == curCmdItem->cmd->cmdType) && in OsCmdExec() 326 (strlen(cmdKey) == strlen(cmdParsed->cmdKeyword)) && in OsCmdExec() 327 (strncmp(cmdKey, (CHAR *)(cmdParsed->cmdKeyword), strlen(cmdKey)) == 0)) { in OsCmdExec() 335 ret = (cmdHook)(cmdParsed->paramCnt, (const CHAR **)cmdParsed->paramArray); in OsCmdExec() 338 for (i = 0; i < cmdParsed->paramCnt; i++) { in OsCmdExec() 339 if (cmdParsed->paramArray[i] != NULL) { in OsCmdExec() 340 (VOID)LOS_MemFree(m_aucSysMem0, cmdParsed->paramArray[i]); in OsCmdExec() 341 cmdParsed->paramArray[i] = NULL; in OsCmdExec()
|
/kernel/liteos_a/apps/shell/include/ |
D | shcmdparse.h | 54 extern unsigned int OsCmdParse(char *cmdStr, CmdParsed *cmdParsed); 56 extern unsigned int OsCmdParseOneToken(CmdParsed *cmdParsed, unsigned int index, const char *token); 57 extern unsigned int OsCmdTokenSplit(char *cmdStr, char split, CmdParsed *cmdParsed);
|
D | shcmd.h | 58 extern unsigned int OsCmdExec(CmdParsed *cmdParsed, char *cmdStr);
|
/kernel/liteos_a/shell/full/include/ |
D | shcmdparse.h | 62 extern UINT32 OsCmdParse(CHAR *cmdStr, CmdParsed *cmdParsed); 64 extern UINT32 OsCmdParseOneToken(CmdParsed *cmdParsed, UINT32 index, const CHAR *token); 65 extern UINT32 OsCmdTokenSplit(CHAR *cmdStr, CHAR split, CmdParsed *cmdParsed);
|
D | shmsg.h | 49 extern UINT32 ShellMsgTypeGet(CmdParsed *cmdParsed, const CHAR *cmdType);
|
D | shcmd.h | 93 extern UINT32 OsCmdExec(CmdParsed *cmdParsed, CHAR *cmdStr);
|
/kernel/liteos_m/components/shell/include/ |
D | shcmdparse.h | 61 extern UINT32 OsCmdParse(CHAR *cmdStr, CmdParsed *cmdParsed); 63 extern UINT32 OsCmdParseOneToken(CmdParsed *cmdParsed, UINT32 index, const CHAR *token); 64 extern UINT32 OsCmdTokenSplit(CHAR *cmdStr, CHAR split, CmdParsed *cmdParsed);
|
D | shmsg.h | 44 extern UINT32 ShellMsgTypeGet(CmdParsed *cmdParsed, const CHAR *cmdType);
|
D | shcmd.h | 88 extern UINT32 OsCmdExec(CmdParsed *cmdParsed);
|
/kernel/liteos_a/syscall/ |
D | misc_syscall.c | 109 CmdParsed cmdParsed; in SysShellExec() local 131 err = memset_s(&cmdParsed, sizeof(CmdParsed), 0, sizeof(CmdParsed)); in SysShellExec() 136 uintRet = ShellMsgTypeGet(&cmdParsed, msgNameDup); in SysShellExec() 141 (void)OsCmdExec(&cmdParsed, (char *)cmdStringDup); in SysShellExec()
|