From fd2227e5c858c840f63629c27e559580e1cbdf2f Mon Sep 17 00:00:00 2001 From: silen Date: Sat, 17 Jul 2021 19:54:42 +0800 Subject: [PATCH] fix: l0 shell adapt new master Change-Id: Ia4e0c848b76e8fda7c5a2f9e1b2246b2a09947a4 Signed-off-by: silen --- components/shell/include/shell.h | 2 +- components/shell/src/base/shcmd.c | 2 -- components/shell/src/cmds/date_shell.c | 1 - components/shell/src/cmds/fullpath.c | 3 +-- components/shell/src/cmds/task_shellcmd.c | 6 +++--- components/shell/src/cmds/vfs_shellcmd.c | 3 --- 6 files changed, 5 insertions(+), 12 deletions(-) diff --git a/components/shell/include/shell.h b/components/shell/include/shell.h index 2c41aed9..20a69356 100644 --- a/components/shell/include/shell.h +++ b/components/shell/include/shell.h @@ -34,6 +34,7 @@ #include "pthread.h" #include "limits.h" +#include "los_compiler.h" #ifdef __cplusplus #if __cplusplus @@ -90,7 +91,6 @@ typedef struct { VOID *cmdMaskKeyLink; UINT32 shellBufOffset; UINT32 shellKeyType; - EVENT_CB_S shellEvent; pthread_mutex_t keyMutex; pthread_mutex_t historyMutex; CHAR shellBuf[SHOW_MAX_LEN]; diff --git a/components/shell/src/base/shcmd.c b/components/shell/src/base/shcmd.c index 544d29cc..6c5c2116 100755 --- a/components/shell/src/base/shcmd.c +++ b/components/shell/src/base/shcmd.c @@ -38,7 +38,6 @@ #include "securec.h" #include "los_mux.h" #include "los_memory.h" -#include "los_typedef.h" #define SHELL_INIT_MAGIC_FLAG 0xABABABAB @@ -325,7 +324,6 @@ OUT: } ShellCB *OsGetShellCb(VOID) - { return g_shellCB; } diff --git a/components/shell/src/cmds/date_shell.c b/components/shell/src/cmds/date_shell.c index 79135049..fc27b98b 100755 --- a/components/shell/src/cmds/date_shell.c +++ b/components/shell/src/cmds/date_shell.c @@ -33,7 +33,6 @@ #include "shell.h" #include "stdlib.h" #include "sys/time.h" -#include "los_typedef.h" #include "sys/stat.h" #include "securec.h" diff --git a/components/shell/src/cmds/fullpath.c b/components/shell/src/cmds/fullpath.c index 7981c2e2..875217b1 100755 --- a/components/shell/src/cmds/fullpath.c +++ b/components/shell/src/cmds/fullpath.c @@ -85,7 +85,6 @@ static char *StrNormalizePath(char *fullpath) char *src = fullpath; /* 2: The position of the path character: / and the end character /0 */ - while (*src != '\0') { if (*src == '.') { if (*(src + 1) == '/') { @@ -267,6 +266,6 @@ int VfsNormalizePath(const char *directory, const char *filename, char **pathnam } *pathname = fullpath; - return ENOERR; + return 0; } diff --git a/components/shell/src/cmds/task_shellcmd.c b/components/shell/src/cmds/task_shellcmd.c index ad272441..53efaad2 100755 --- a/components/shell/src/cmds/task_shellcmd.c +++ b/components/shell/src/cmds/task_shellcmd.c @@ -31,13 +31,13 @@ #include "stdlib.h" #include "los_config.h" -#include "los_exc.h" #include "los_task.h" #include "los_sem.h" #include "shcmd.h" #include "shell.h" #define OS_INVALID_SEM_ID 0xFFFFFFFF +#define OS_ALL_TASK_MASK 0xFFFFFFFF LITE_OS_SEC_TEXT_MINOR UINT8 *OsShellCmdConvertTskStatus(UINT16 taskStatus) { @@ -48,8 +48,8 @@ LITE_OS_SEC_TEXT_MINOR UINT8 *OsShellCmdConvertTskStatus(UINT16 taskStatus) } else { if (taskStatus & OS_TASK_STATUS_DELAY) { return (UINT8 *)"Delay"; - } else if (taskStatus & OS_TASK_STATUS_PEND_QUEUE) { - return (UINT8 *)"Pend"; + } else if (taskStatus & OS_TASK_STATUS_PEND_TIME) { + return (UINT8 *)"PendTime"; } else if (taskStatus & OS_TASK_STATUS_PEND) { return (UINT8 *)"Pend"; } else if (taskStatus & OS_TASK_STATUS_SUSPEND) { diff --git a/components/shell/src/cmds/vfs_shellcmd.c b/components/shell/src/cmds/vfs_shellcmd.c index a9be1791..db2f7153 100755 --- a/components/shell/src/cmds/vfs_shellcmd.c +++ b/components/shell/src/cmds/vfs_shellcmd.c @@ -30,16 +30,13 @@ */ #include "los_config.h" -#include "sys/mount.h" #include "los_task.h" -#include "los_typedef.h" #include "shell.h" #include "sys/stat.h" #include "stdlib.h" #include "unistd.h" #include "fcntl.h" -#include "sys/statfs.h" #include "stdio.h" #include "pthread.h"