NSH: Add logic for the case where the passwd file is read-only. ROMFS image needs to be marked as const, or it will end up in RAM.

This commit is contained in:
Gregory Nutt
2016-01-20 13:05:25 -06:00
parent 3dad8a29a2
commit 681bfa2605
8 changed files with 27 additions and 10 deletions

View File

@@ -45,7 +45,8 @@
#include "nsh_console.h"
#if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_DESCRIPTORS > 0 && \
defined(CONFIG_FS_WRITABLE) && defined(CONFIG_FSUTILS_PASSWD)
defined(CONFIG_FS_WRITABLE) && defined(CONFIG_FSUTILS_PASSWD) && \
!defined(CONFIG_FSUTILS_PASSWD_READONLY)
/****************************************************************************
* Public Functions
@@ -115,4 +116,5 @@ int cmd_passwd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
#endif /* !CONFIG_NSH_DISABLE_USERADD */
#endif /* !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 &&
* CONFIG_FS_WRITABLE && CONFIG_FSUTILS_PASSWD */
* CONFIG_FS_WRITABLE && CONFIG_FSUTILS_PASSWD &&
* !CONFIG_FSUTILS_PASSWD_READONLY */