summaryrefslogtreecommitdiff
path: root/components/utilities
diff options
context:
space:
mode:
authorGrissiom <[email protected]>2013-09-23 13:13:03 +0800
committerGrissiom <[email protected]>2013-09-23 13:13:03 +0800
commit783a6a67176e5594bed0cbba82cb9f0ef70e3863 (patch)
tree953ed85df2452bdbb950a85e96c061d6e4f0ca06 /components/utilities
parent29871c0d84d4430302fc7a2c535a6fe8cda309cb (diff)
logtrace: cleanup code and fix compiling warnings
Diffstat (limited to 'components/utilities')
-rw-r--r--components/utilities/logtrace/log_trace.c4
-rw-r--r--components/utilities/logtrace/log_trace.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/components/utilities/logtrace/log_trace.c b/components/utilities/logtrace/log_trace.c
index 79d5a21884..cc55b1dd44 100644
--- a/components/utilities/logtrace/log_trace.c
+++ b/components/utilities/logtrace/log_trace.c
@@ -41,7 +41,7 @@ static struct rt_device _log_device;
static rt_device_t _traceout_device = RT_NULL;
/* define a default lg session. The name is empty. */
-static struct log_trace_session _def_session = {{0}, LOG_TRACE_LEVEL_INFO};
+static struct log_trace_session _def_session = {{"\0"}, LOG_TRACE_LEVEL_INFO};
static struct log_trace_session *_the_sessions[LOG_TRACE_MAX_SESSION] = {&_def_session};
/* there is a default session at least */
static rt_uint16_t _the_sess_nr = 1;
@@ -272,7 +272,7 @@ static void _lg_fmtout(
_trace_buf[0] = ']';
ptr = &_trace_buf[1];
- length = vsnprintf(ptr, LOG_TRACE_BUFSZ, fmt, argptr);
+ length = rt_vsnprintf(ptr, LOG_TRACE_BUFSZ, fmt, argptr);
if (length >= LOG_TRACE_BUFSZ)
length = LOG_TRACE_BUFSZ - 1;
diff --git a/components/utilities/logtrace/log_trace.h b/components/utilities/logtrace/log_trace.h
index d5a028f553..42240858fb 100644
--- a/components/utilities/logtrace/log_trace.h
+++ b/components/utilities/logtrace/log_trace.h
@@ -140,12 +140,12 @@ rt_err_t log_trace_set_device(const char *device_name);
void log_trace_flush(void);
+#ifdef RT_USING_DFS
/** set the backend to file */
void log_trace_set_file(const char *filename);
-/* log trace for NAND Flash */
-void log_trace_nand_init(const char *nand_device);
void log_trace_file_init(const char *filename);
+#endif /* RT_USING_DFS */
#endif