All NSH-related files under nuttx/configs changed to use the corrected syslog interfaces

This commit is contained in:
Gregory Nutt
2014-10-08 14:28:55 -06:00
parent c0d179f4a8
commit f40857c04f
58 changed files with 447 additions and 1274 deletions
+4 -20
View File
@@ -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