anchao opened a new pull request, #15120:
URL: https://github.com/apache/nuttx/pull/15120

   ## Summary
   
   libc/chdir: chdir/fchdir should not depend on environment variables
   
   This PR will still allow basic shell operations such as cd/ls/pwd to be used 
even when the environment is disabled.
   
   Signed-off-by: chao an <anc...@lixiang.com>
   
   ## Impact
   
   N/A
   
   ## Testing
   
   sim/nsh  and enable  CONFIG_DISABLE_ENVIRON
   
   before:
   ```
   $ ./build/nuttx 
   
   NuttShell (NSH) NuttX-10.4.0
   nsh> ls
   nsh: ls: missing required argument(s)
   nsh> cd
   nsh: cd: command not found
   nsh> pwd
   nsh: pwd: command not found
   nsh> ls /
   /:
    bin/
    data/
    dev/
    etc/
    proc/
    tmp/
   nsh> 
   ```
   after:
   
   
   ```
   $ ./build/nuttx 
   
   NuttShell (NSH) NuttX-10.4.0
   nsh> ls
   /:
    bin/
    data/
    dev/
    etc/
    proc/
    tmp/
   nsh> cd
   nsh> cd /data
   nsh> pwd
   /data
   nsh> ls /
   /:
    bin/
    data/
    dev/
    etc/
    proc/
    tmp/
   nsh> 
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to