mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 11:23:07 +08:00
nshlib: move etc romfs mount from nsh to nuttx
This commit corresponds to apache/nuttx#11498 in nuttx. Move etc romfs mount to sched/init for compatibility with kernel/protected mode. changes: - move etc romfs mount from nsh to Nuttx, but keep the script to parse and execute. - move and rename the related CONFIG, move customized nsh_romfsimg.h to etc_romfs.c in boards, and no need declaration for romfs_img/romfs_img_len. Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_NSH_ROMFSETC) || defined(CONFIG_NSH_ROMFSRC)
|
||||
#if defined(CONFIG_ETC_ROMFS) || defined(CONFIG_NSH_ROMFSRC)
|
||||
static int nsh_script_redirect(FAR struct nsh_vtbl_s *vtbl,
|
||||
FAR const char *cmd,
|
||||
FAR const char *path,
|
||||
@@ -202,7 +202,7 @@ int nsh_script(FAR struct nsh_vtbl_s *vtbl, FAR const FAR char *cmd,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NSH_ROMFSETC
|
||||
#ifdef CONFIG_ETC_ROMFS
|
||||
int nsh_sysinitscript(FAR struct nsh_vtbl_s *vtbl)
|
||||
{
|
||||
/* Since most existing systems only use the NSH_INITPATH script file.
|
||||
@@ -224,7 +224,7 @@ int nsh_sysinitscript(FAR struct nsh_vtbl_s *vtbl)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NSH_ROMFSETC
|
||||
#ifdef CONFIG_ETC_ROMFS
|
||||
int nsh_initscript(FAR struct nsh_vtbl_s *vtbl)
|
||||
{
|
||||
static bool initialized;
|
||||
@@ -268,6 +268,6 @@ int nsh_loginscript(FAR struct nsh_vtbl_s *vtbl)
|
||||
return nsh_script_redirect(vtbl, "login", NSH_RCPATH, true);
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_NSH_ROMFSETC */
|
||||
#endif /* CONFIG_ETC_ROMFS */
|
||||
|
||||
#endif /* CONFIG_NSH_DISABLESCRIPT */
|
||||
|
Reference in New Issue
Block a user