mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-18 08:52:01 +08:00
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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user