/****************************************************************************
* Private Functions
****************************************************************************/
-
static void fscmd_free(FAR char *path)
{
if (path) {
free(path);
}
}
-
+#ifndef CONFIG_DISABLE_ENVIRON
/****************************************************************************
* Name: tash_cat
*
return 0;
}
-
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
/****************************************************************************
* Name: tash_cd
*
return ret;
}
-
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
/****************************************************************************
* Name: foreach_direntry
*
return ret;
}
-
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
/****************************************************************************
* Name: tash_mkdir
*
return ret;
}
-
+#endif
#ifndef CONFIG_DISABLE_MOUNTPOINT
#ifdef CONFIG_RAMDISK
/****************************************************************************
}
#endif /* END OF CONFIG FS_SMARTFS */
+#ifndef CONFIG_DISABLE_ENVIRON
static int mount_handler(FAR const char *mountpoint, FAR struct statfs *statbuf, FAR void *arg)
{
char *fstype;
return ret;
}
-
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
/****************************************************************************
* Name: tash_umount
*
return ret;
}
+#endif
#endif /* END OF CONFIG_DISABLE_MOUNTPOINT */
+#ifndef CONFIG_DISABLE_ENVIRON
/****************************************************************************
* Name: tash_pwd
*
return 0;
}
-
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
/****************************************************************************
* Name: tash_rm
*
return ret;
}
-
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
/****************************************************************************
* Name: tash_rmdir
*
return ret;
}
-
+#endif
static int df_handler(FAR const char *mountpoint, FAR struct statfs *statbuf, FAR void *arg)
{
printf("%6ld %8ld %8ld %8ld %s\n", statbuf->f_bsize, statbuf->f_blocks, statbuf->f_blocks - statbuf->f_bavail, statbuf->f_bavail, mountpoint);
return OK;
}
-
static const char *get_fstype(FAR struct statfs *statbuf)
{
FAR const char *fstype;
}
const static tash_cmdlist_t fs_utilcmds[] = {
+#ifndef CONFIG_DISABLE_ENVIRON
{"cat", tash_cat, TASH_EXECMD_SYNC},
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
{"cd", tash_cd, TASH_EXECMD_SYNC},
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
{"ls", tash_ls, TASH_EXECMD_SYNC},
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
{"mkdir", tash_mkdir, TASH_EXECMD_SYNC},
+#endif
#ifndef CONFIG_DISABLE_MOUNTPOINT
#ifdef CONFIG_RAMDISK
{"mkrd", tash_mkrd, TASH_EXECMD_SYNC},
#ifdef CONFIG_FS_SMARTFS
{"mksmartfs", tash_mksmartfs, TASH_EXECMD_SYNC},
#endif
+#ifndef CONFIG_DISABLE_ENVIRON
{"mount", tash_mount, TASH_EXECMD_SYNC},
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
{"umount", tash_umount, TASH_EXECMD_SYNC},
#endif
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
{"pwd", tash_pwd, TASH_EXECMD_SYNC},
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
{"rm", tash_rm, TASH_EXECMD_SYNC},
+#endif
+#ifndef CONFIG_DISABLE_ENVIRON
{"rmdir", tash_rmdir, TASH_EXECMD_SYNC},
+#endif
{"df", tash_df, TASH_EXECMD_SYNC},
{NULL, NULL, 0}
};