mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Misc bug fixes related to NSH file execution
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5530 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+24
-7
@@ -291,14 +291,31 @@ nsh
|
||||
apps/examples/hello.
|
||||
|
||||
3. This configuration has BINFS enabled so that the builtin applications
|
||||
can be made visible in the file system. For example:
|
||||
can be made visible in the file system. Because of that, the
|
||||
build in applications do not work as other examples.
|
||||
|
||||
NuttShell (NSH) NuttX-6.24
|
||||
nsh> mount -t binfs /bin
|
||||
nsh> ls /bin
|
||||
/bin:
|
||||
hello
|
||||
nsh>
|
||||
For example trying to execute the hello builtin application will
|
||||
fail:
|
||||
|
||||
nsh> hello
|
||||
nsh: hello: command not found
|
||||
nsh>
|
||||
|
||||
Unless you first mount the BINFS file system:
|
||||
|
||||
nsh> mount -t binfs /bin
|
||||
nsh> ls /bin
|
||||
/bin:
|
||||
hello
|
||||
nsh> echo $PATH
|
||||
/bin
|
||||
nsh> hello
|
||||
Hello, World!!
|
||||
nsh>
|
||||
|
||||
Notice that the executable 'hello' is found using the value in the PATH
|
||||
variable (which was preset to "/bin"). If the PATH variable were not set
|
||||
then you would have to use /bin/hello on the command line.
|
||||
|
||||
nsh2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user