From 18360f4506997da4a3037f6b041dafb181ecb94b Mon Sep 17 00:00:00 2001 From: Oleg Lyovin Date: Tue, 18 Jul 2017 18:29:12 +0300 Subject: [PATCH] apps/fscmd: hide util 'df' if mountpoints are disabled * 'df' utilities task is to show filesystem info, but it is meaningless when mountpoints are disabled and hence no user filesystems are supported. Signed-off-by: Oleg Lyovin --- apps/system/utils/fscmd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/system/utils/fscmd.c b/apps/system/utils/fscmd.c index 350cca4..f31125d 100644 --- a/apps/system/utils/fscmd.c +++ b/apps/system/utils/fscmd.c @@ -1178,6 +1178,7 @@ static int df_man_readable_handler(FAR const char *mountpoint, FAR struct statfs * Name: tash_df ****************************************************************************/ +#ifndef CONFIG_DISABLE_MOUNTPOINT static int tash_df(int argc, char **args) { if (argc > 1 && strcmp(args[1], "-h") == 0) { @@ -1191,6 +1192,7 @@ static int tash_df(int argc, char **args) return 0; } +#endif const static tash_cmdlist_t fs_utilcmds[] = { #ifndef CONFIG_DISABLE_ENVIRON @@ -1228,7 +1230,9 @@ const static tash_cmdlist_t fs_utilcmds[] = { #ifndef CONFIG_DISABLE_ENVIRON {"rmdir", tash_rmdir, TASH_EXECMD_SYNC}, #endif +#ifndef CONFIG_DISABLE_MOUNTPOINT {"df", tash_df, TASH_EXECMD_SYNC}, +#endif {NULL, NULL, 0} }; -- 2.7.4