diff --git a/ChangeLog.txt b/ChangeLog.txt index 018dd72ff..c5c513d02 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -828,3 +828,6 @@ * apps/nshilib: rmdir can now be used in the pseudo-filesystem. Hence, the command needs to be available even if there are no write-able filesystem enabled (2014-2-19). + * apps/nshilib: mkdir can now be used in the pseudo-filesystem. Hence, + the command needs to be available even if there are no write-able + filesystem enabled (2014-2-19). diff --git a/nshlib/README.txt b/nshlib/README.txt index 082d8dcc6..6e112846f 100644 --- a/nshlib/README.txt +++ b/nshlib/README.txt @@ -972,7 +972,7 @@ Command Dependencies on Configuration Settings ls CONFIG_NFILE_DESCRIPTORS > 0 md5 CONFIG_NETUTILS_CODECS && CONFIG_CODECS_HASH_MD5 mb,mh,mw --- - mkdir !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_WRITABLE (see note 4) + mkdir CONFIG_NFILE_DESCRIPTORS > 0 mkfatfs !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_FAT mkfifo CONFIG_NFILE_DESCRIPTORS > 0 mkrd !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_WRITABLE (see note 4) @@ -984,7 +984,7 @@ Command Dependencies on Configuration Settings put CONFIG_NET && CONFIG_NET_UDP && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NET_BUFSIZE >= 558 (see note 1,2) pwd !CONFIG_DISABLE_ENVIRON && CONFIG_NFILE_DESCRIPTORS > 0 rm !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_WRITABLE (see note 4) - rmdir !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_FS_WRITABLE (see note 4) + rmdir CONFIG_NFILE_DESCRIPTORS > 0 set !CONFIG_DISABLE_ENVIRON sh CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 && !CONFIG_NSH_DISABLESCRIPT sleep !CONFIG_DISABLE_SIGNALS diff --git a/nshlib/nsh.h b/nshlib/nsh.h index 78a5ea538..97afc430f 100644 --- a/nshlib/nsh.h +++ b/nshlib/nsh.h @@ -717,6 +717,9 @@ void nsh_usbtrace(void); # ifndef CONFIG_NSH_DISABLE_LS int cmd_ls(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); # endif +# ifndef CONFIG_NSH_DISABLE_MKDIR + int cmd_mkdir(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); +# endif # ifndef CONFIG_NSH_DISABLE_RMDIR int cmd_rmdir(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); # endif @@ -746,9 +749,6 @@ void nsh_usbtrace(void); int cmd_umount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); # endif # ifdef CONFIG_FS_WRITABLE -# ifndef CONFIG_NSH_DISABLE_MKDIR - int cmd_mkdir(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); -# endif # ifndef CONFIG_NSH_DISABLE_MKRD int cmd_mkrd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); # endif diff --git a/nshlib/nsh_command.c b/nshlib/nsh_command.c index 996383694..447036bc1 100644 --- a/nshlib/nsh_command.c +++ b/nshlib/nsh_command.c @@ -252,7 +252,7 @@ static const struct cmdmap_s g_cmdmap[] = # endif #endif -#if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_FS_WRITABLE) +#if CONFIG_NFILE_DESCRIPTORS > 0 # ifndef CONFIG_NSH_DISABLE_MKDIR { "mkdir", cmd_mkdir, 2, 2, "" }, # endif diff --git a/nshlib/nsh_fscmds.c b/nshlib/nsh_fscmds.c index fd4cac222..ccd831949 100644 --- a/nshlib/nsh_fscmds.c +++ b/nshlib/nsh_fscmds.c @@ -995,7 +995,7 @@ int cmd_ls(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) * Name: cmd_mkdir ****************************************************************************/ -#if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_FS_WRITABLE) +#if CONFIG_NFILE_DESCRIPTORS > 0 #ifndef CONFIG_NSH_DISABLE_MKDIR int cmd_mkdir(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) {