mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
All NSH-related files under nuttx/configs changed to use the corrected syslog interfaces
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <debug.h>
|
||||
#include <syslog.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "stm32.h"
|
||||
@@ -97,22 +97,6 @@
|
||||
# undef HAVE_USBHOST
|
||||
#endif
|
||||
|
||||
/* Debug ********************************************************************/
|
||||
|
||||
#ifdef CONFIG_CPP_HAVE_VARARGS
|
||||
# ifdef CONFIG_DEBUG
|
||||
# define message(...) lowsyslog(__VA_ARGS__)
|
||||
# else
|
||||
# define message(...) printf(__VA_ARGS__)
|
||||
# endif
|
||||
#else
|
||||
# ifdef CONFIG_DEBUG
|
||||
# define message lowsyslog
|
||||
# else
|
||||
# define message printf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -137,8 +121,8 @@ int nsh_archinitialize(void)
|
||||
ret = stm32_w25initialize(CONFIG_NSH_W25MINOR);
|
||||
if (ret < 0)
|
||||
{
|
||||
message("nsh_archinitialize: Failed to initialize W25 minor %d: %d\n",
|
||||
CONFIG_NSH_W25MINOR, ret);
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize W25 minor %d: %d\n",
|
||||
CONFIG_NSH_W25MINOR, ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@@ -151,7 +135,7 @@ int nsh_archinitialize(void)
|
||||
ret = stm32_usbhost_initialize();
|
||||
if (ret != OK)
|
||||
{
|
||||
message("nsh_archinitialize: Failed to initialize USB host: %d\n", ret);
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user