nshlib: Move trim_dir() and foreach_direntry() from nsh_fscmds.c to nsh_fsutils.c as nsh_trimdir() and nsh_foreach_direntry(), respectively

This commit is contained in:
Gregory Nutt
2015-11-28 08:29:27 -06:00
parent 510f325ae4
commit 92b1eb36c8
5 changed files with 189 additions and 114 deletions

View File

@@ -70,11 +70,11 @@
struct cmdmap_s
{
const char *cmd; /* Name of the command */
cmd_t handler; /* Function that handles the command */
FAR const char *cmd; /* Name of the command */
nsh_cmd_t handler; /* Function that handles the command */
uint8_t minargs; /* Minimum number of arguments (including command) */
uint8_t maxargs; /* Maximum number of arguments (including command) */
const char *usage; /* Usage instructions for 'help' command */
FAR const char *usage; /* Usage instructions for 'help' command */
};
/****************************************************************************
@@ -784,7 +784,7 @@ int nsh_command(FAR struct nsh_vtbl_s *vtbl, int argc, char *argv[])
{
const struct cmdmap_s *cmdmap;
const char *cmd;
cmd_t handler = cmd_unrecognized;
nsh_cmd_t handler = cmd_unrecognized;
int ret;
/* The form of argv is: