瀏覽代碼

Merge pull request #1670 from RT-Thread/fix_chdir

[finsh] Remove chdir feature in msh
Bernard Xiong 6 年之前
父節點
當前提交
cfce8815fb
共有 1 個文件被更改,包括 0 次插入7 次删除
  1. 0 7
      components/finsh/msh.c

+ 0 - 7
components/finsh/msh.c

@@ -368,7 +368,6 @@ int msh_exec(char *cmd, rt_size_t length)
     /* Exec sequence:
     /* Exec sequence:
      * 1. built-in command
      * 1. built-in command
      * 2. module(if enabled)
      * 2. module(if enabled)
-     * 3. chdir to the directry(if possible)
      */
      */
     if (_msh_exec_cmd(cmd, length, &cmd_ret) == 0)
     if (_msh_exec_cmd(cmd, length, &cmd_ret) == 0)
     {
     {
@@ -386,12 +385,6 @@ int msh_exec(char *cmd, rt_size_t length)
     {
     {
         return 0;
         return 0;
     }
     }
-
-    /* change to this directory */
-    if (chdir(cmd) == 0)
-    {
-        return 0;
-    }
 #endif
 #endif
 
 
 #if defined(RT_USING_LWP) && defined(RT_USING_DFS)
 #if defined(RT_USING_LWP) && defined(RT_USING_DFS)