summaryrefslogtreecommitdiff
path: root/nuttx/libc/stdio
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-08 09:44:15 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-08 09:44:15 -0600
commitab1282a14781ce3244908b0421b295b1ea65f26f (patch)
tree7ca3d474b1d41ca65d07978577147e49da205f5b /nuttx/libc/stdio
parentcc7f2b26e037d5790cc8751a2f7354e39513783c (diff)
downloadpx4-nuttx-ab1282a14781ce3244908b0421b295b1ea65f26f.tar.gz
px4-nuttx-ab1282a14781ce3244908b0421b295b1ea65f26f.tar.bz2
px4-nuttx-ab1282a14781ce3244908b0421b295b1ea65f26f.zip
make standard syslog and vsyslog POSIX compliant (also modify non-standard syslog functions for compatibility). This will break a lot of things until ALL usage of syslog is updated to use the modified interfaces
Diffstat (limited to 'nuttx/libc/stdio')
-rw-r--r--nuttx/libc/stdio/lib_lowsyslog.c6
-rw-r--r--nuttx/libc/stdio/lib_printf.c6
-rw-r--r--nuttx/libc/stdio/lib_syslog.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/nuttx/libc/stdio/lib_lowsyslog.c b/nuttx/libc/stdio/lib_lowsyslog.c
index 3ada77bf5..e35db0fae 100644
--- a/nuttx/libc/stdio/lib_lowsyslog.c
+++ b/nuttx/libc/stdio/lib_lowsyslog.c
@@ -49,7 +49,7 @@
#if !defined(CONFIG_BUILD_PROTECTED) || defined(__KERNEL__)
/****************************************************************************
- * Definitions
+ * Pre-processor Definitions
****************************************************************************/
/****************************************************************************
@@ -90,7 +90,7 @@
#if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_SYSLOG)
-int lowvsyslog(FAR const char *fmt, va_list ap)
+int lowvsyslog(int priority, FAR const char *fmt, va_list ap)
{
struct lib_outstream_s stream;
@@ -108,7 +108,7 @@ int lowvsyslog(FAR const char *fmt, va_list ap)
* Name: lowsyslog
****************************************************************************/
-int lowsyslog(FAR const char *fmt, ...)
+int lowsyslog(int priority, FAR const char *fmt, ...)
{
va_list ap;
int ret;
diff --git a/nuttx/libc/stdio/lib_printf.c b/nuttx/libc/stdio/lib_printf.c
index a4530daad..f9446ed71 100644
--- a/nuttx/libc/stdio/lib_printf.c
+++ b/nuttx/libc/stdio/lib_printf.c
@@ -1,7 +1,7 @@
/****************************************************************************
* libc/stdio/lib_printf.c
*
- * Copyright (C) 2007-2008, 2011-2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2008, 2011-2012, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -95,9 +95,9 @@ int printf(FAR const char *fmt, ...)
#if CONFIG_NFILE_STREAMS > 0
ret = vfprintf(stdout, fmt, ap);
#elif CONFIG_NFILE_DESCRIPTORS > 0
- ret = vsyslog(fmt, ap);
+ ret = vsyslog(LOG_INFO, fmt, ap);
#elif defined(CONFIG_ARCH_LOWPUTC)
- ret = lowvsyslog(fmt, ap);
+ ret = lowvsyslog(LOG_INFO, fmt, ap);
#else
# ifdef CONFIG_CPP_HAVE_WARNING
# warning "printf has no data sink"
diff --git a/nuttx/libc/stdio/lib_syslog.c b/nuttx/libc/stdio/lib_syslog.c
index 5f0958262..97465d51b 100644
--- a/nuttx/libc/stdio/lib_syslog.c
+++ b/nuttx/libc/stdio/lib_syslog.c
@@ -1,7 +1,7 @@
/****************************************************************************
* libc/stdio/lib_syslog.c
*
- * Copyright (C) 2007-2009, 2011-2013 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2011-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -91,7 +91,7 @@
* Name: vsyslog
****************************************************************************/
-int vsyslog(FAR const char *fmt, va_list ap)
+int vsyslog(int priority, FAR const char *fmt, va_list ap)
{
#if defined(CONFIG_SYSLOG)
@@ -135,7 +135,7 @@ int vsyslog(FAR const char *fmt, va_list ap)
* Name: syslog
****************************************************************************/
-int syslog(FAR const char *fmt, ...)
+int syslog(int priority, FAR const char *fmt, ...)
{
va_list ap;
int ret;