Remove some last traces of lowvsyslog that were missed; Add a SYSLOG emergency channel for handling assertion output more cleanly

This commit is contained in:
Gregory Nutt
2016-06-20 16:11:50 -06:00
parent d1a62f1d24
commit 505ca542e8
26 changed files with 177 additions and 72 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ int _alert(const char *format, ...)
int ret;
va_start(ap, format);
ret = lowvsyslog(LOG_EMERG, format, ap);
ret = vsyslog(LOG_EMERG, format, ap);
va_end(ap);
return ret;
-32
View File
@@ -33,44 +33,12 @@
*
****************************************************************************/
/****************************************************************************
* Compilation Switches
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <stdio.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Type Declarations
****************************************************************************/
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
/****************************************************************************
* Public Constant Data
****************************************************************************/
/****************************************************************************
* Public Data
****************************************************************************/
/****************************************************************************
* Private Constant Data
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
+1 -3
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* libc/stdio/lib_printf.c
*
* Copyright (C) 2007-2008, 2011-2012, 2014 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2008, 2011-2012, 2014, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -60,8 +60,6 @@ int printf(FAR const IPTR char *fmt, ...)
ret = vfprintf(stdout, fmt, ap);
#elif CONFIG_NFILE_DESCRIPTORS > 0
ret = vsyslog(LOG_INFO, fmt, ap);
#elif defined(CONFIG_ARCH_LOWPUTC)
ret = lowvsyslog(LOG_INFO, fmt, ap);
#else
# ifdef CONFIG_CPP_HAVE_WARNING
# warning "printf has no data sink"
+2 -2
View File
@@ -67,14 +67,14 @@ int vsyslog(int priority, FAR const IPTR char *fmt, va_list ap)
if ((g_syslog_mask & LOG_MASK(priority)) != 0)
{
/* Yes.. lPerform the _vsyslog system call.
/* Yes.. Perform the _vsyslog system call.
*
* NOTE: The va_list parameter is passed by reference. That is
* because the va_list is a structure in some compilers and passing
* of structures in the NuttX sycalls does not work.
*/
ret = _vsyslog(fmt, &ap);
ret = _vsyslog(priority, fmt, &ap);
}
return ret;