boards/sim/sim/sim/src/sim_bringup.c: Auto mount binfs to /bin if CONFIG_FS_BINFS.
This commit is contained in:
parent
948c566e39
commit
febf226992
@ -634,16 +634,8 @@ nsh
|
|||||||
can be made visible in the file system. Because of that, the
|
can be made visible in the file system. Because of that, the
|
||||||
build in applications do not work as other examples.
|
build in applications do not work as other examples.
|
||||||
|
|
||||||
For example trying to execute the hello builtin application will
|
The binfs filesystem will be mounted at /bin when the system starts up.
|
||||||
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
|
nsh> ls /bin
|
||||||
/bin:
|
/bin:
|
||||||
hello
|
hello
|
||||||
@ -1216,7 +1208,9 @@ ustream
|
|||||||
|
|
||||||
To use the test:
|
To use the test:
|
||||||
|
|
||||||
nsh> mount -t binfs /bin
|
|
||||||
nsh> server &
|
nsh> server &
|
||||||
nsh> client
|
nsh> client
|
||||||
|
|
||||||
|
Note that the binfs file system is mounted at /bin when the system
|
||||||
|
starts up.
|
||||||
|
|
||||||
|
@ -103,6 +103,16 @@ int sim_bringup(void)
|
|||||||
#endif
|
#endif
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
#ifdef CONFIG_FS_BINFS
|
||||||
|
/* Mount the binfs file system */
|
||||||
|
|
||||||
|
ret = mount(NULL, "/bin", "binfs", 0, NULL);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: Failed to mount binfs at /bin: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_FS_PROCFS
|
#ifdef CONFIG_FS_PROCFS
|
||||||
/* Mount the procfs file system */
|
/* Mount the procfs file system */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user