Browse Source

Merge pull request #163 from grissiom/compiling-fix

Compiling fix
Bernard Xiong 11 years ago
parent
commit
bfc0d8c91d
2 changed files with 5 additions and 0 deletions
  1. 2 0
      components/finsh/msh_cmd.c
  2. 3 0
      components/utilities/logtrace/log_file.c

+ 2 - 0
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)
 {

+ 3 - 0
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.h>
 FINSH_FUNCTION_EXPORT_ALIAS(log_trace_set_file, log_file, set output filename of log trace);
+#endif
 
 #endif /* RT_USING_DFS */