summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-08 20:12:52 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-08 20:12:52 -0600
commit9ba2bbe3ec4acca7c0705ceb4cca65b0399ec1e5 (patch)
tree1ff5c7ef4f4bedcd334e564cdac529e131b3dbd7 /nuttx/fs
parent5aade852e24618cdb7d78eccb2794a30649b3592 (diff)
downloadpx4-nuttx-9ba2bbe3ec4acca7c0705ceb4cca65b0399ec1e5.tar.gz
px4-nuttx-9ba2bbe3ec4acca7c0705ceb4cca65b0399ec1e5.tar.bz2
px4-nuttx-9ba2bbe3ec4acca7c0705ceb4cca65b0399ec1e5.zip
Passing va_list in syscall does not work. Temporarily moved syslog and lowsyslog into kernel code and access via a system call. Need to revisit. Will probably need to move all of syslog back from fs/syslog to libc/syslog
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/syslog/Make.defs4
-rw-r--r--nuttx/fs/syslog/fs_devsyslog.c (renamed from nuttx/fs/syslog/fs_syslog.c)2
-rw-r--r--nuttx/fs/syslog/fs_lowsyslog.c (renamed from nuttx/fs/syslog/fs_lowvsyslog.c)18
-rw-r--r--nuttx/fs/syslog/fs_vsyslog.c18
4 files changed, 39 insertions, 3 deletions
diff --git a/nuttx/fs/syslog/Make.defs b/nuttx/fs/syslog/Make.defs
index 21e04e9e6..a6e92b8bf 100644
--- a/nuttx/fs/syslog/Make.defs
+++ b/nuttx/fs/syslog/Make.defs
@@ -35,7 +35,7 @@
# Add the internal C files to the build
-CSRCS += fs_vsyslog.c fs_lowvsyslog.c fs_setlogmask.c
+CSRCS += fs_vsyslog.c fs_lowsyslog.c fs_setlogmask.c
ifeq ($(CONFIG_SYSLOG),y)
CSRCS += fs_syslogstream.c
@@ -49,7 +49,7 @@ endif
ifeq ($(CONFIG_SYSLOG),y)
ifeq ($(CONFIG_SYSLOG_CHAR),y)
-CSRCS += fs_syslog.c
+CSRCS += fs_devsyslog.c
endif
endif
diff --git a/nuttx/fs/syslog/fs_syslog.c b/nuttx/fs/syslog/fs_devsyslog.c
index 151f1cab9..930c89be4 100644
--- a/nuttx/fs/syslog/fs_syslog.c
+++ b/nuttx/fs/syslog/fs_devsyslog.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * fs/syslog/syslog.c
+ * fs/syslog/fs_devsyslog.c
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/nuttx/fs/syslog/fs_lowvsyslog.c b/nuttx/fs/syslog/fs_lowsyslog.c
index 52d493a73..3caa81d8a 100644
--- a/nuttx/fs/syslog/fs_lowvsyslog.c
+++ b/nuttx/fs/syslog/fs_lowsyslog.c
@@ -126,4 +126,22 @@ int lowvsyslog(int priority, FAR const char *fmt, va_list ap)
return ret;
}
+/****************************************************************************
+ * Name: lowsyslog
+ ****************************************************************************/
+
+int lowsyslog(int priority, FAR const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ /* Let lowvsyslog do the work */
+
+ va_start(ap, fmt);
+ ret = lowvsyslog(priority, fmt, ap);
+ va_end(ap);
+
+ return ret;
+}
+
#endif /* CONFIG_ARCH_LOWPUTC || CONFIG_SYSLOG */
diff --git a/nuttx/fs/syslog/fs_vsyslog.c b/nuttx/fs/syslog/fs_vsyslog.c
index 8d49570ec..0f4d1844e 100644
--- a/nuttx/fs/syslog/fs_vsyslog.c
+++ b/nuttx/fs/syslog/fs_vsyslog.c
@@ -149,3 +149,21 @@ int vsyslog(int priority, FAR const char *fmt, va_list ap)
return ret;
}
+
+/****************************************************************************
+ * Name: lowsyslog
+ ****************************************************************************/
+
+int lowsyslog(int priority, FAR const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ /* Let lowvsyslog do the work */
+
+ va_start(ap, fmt);
+ ret = lowvsyslog(priority, fmt, ap);
+ va_end(ap);
+
+ return ret;
+}