mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user