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