From 05651e7c662139a1d56c6ee0d859ae190346b314 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Thu, 26 Sep 2013 11:49:33 +0800 Subject: [PATCH 1/2] logtrace: only export cmd when finsh is enabled --- components/utilities/logtrace/log_file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/utilities/logtrace/log_file.c b/components/utilities/logtrace/log_file.c index 72e4724b6..2f4a28b63 100644 --- a/components/utilities/logtrace/log_file.c +++ b/components/utilities/logtrace/log_file.c @@ -121,6 +121,9 @@ void log_trace_set_file(const char *filename) log_trace_file_init(filename); log_trace_set_device("logfile"); } +#ifdef RT_USING_FINSH +#include FINSH_FUNCTION_EXPORT_ALIAS(log_trace_set_file, log_file, set output filename of log trace); +#endif #endif /* RT_USING_DFS */ From df4e8ff060fc2d3f6092df0e9ba75ffba0650a1e Mon Sep 17 00:00:00 2001 From: Grissiom Date: Thu, 26 Sep 2013 11:50:28 +0800 Subject: [PATCH 2/2] msh: only export cd/pwd when DFS_USING_WORKDIR is set --- components/finsh/msh_cmd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/finsh/msh_cmd.c b/components/finsh/msh_cmd.c index fac90479c..cffb374c2 100644 --- a/components/finsh/msh_cmd.c +++ b/components/finsh/msh_cmd.c @@ -136,6 +136,7 @@ int cmd_rm(int argc, char** argv) } FINSH_FUNCTION_EXPORT_ALIAS(cmd_rm, __cmd_rm, "Remove (unlink) the FILE(s)."); +#ifdef DFS_USING_WORKDIR int cmd_cd(int argc, char** argv) { if (argc == 1) @@ -157,6 +158,7 @@ int cmd_pwd(int argc, char** argv) return 0; } FINSH_FUNCTION_EXPORT_ALIAS(cmd_pwd, __cmd_pwd, Print the name of the current working directory.); +#endif int cmd_mkdir(int argc, char** argv) {