syslog: Code outside libc shouldn't call nx_vsyslog directly
since nx_vsyslog is the implementation detail Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
6b1f94ee49
commit
94bb2e05bb
@ -166,12 +166,11 @@ static inline void up_registerdump(void)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return OK;
|
||||
}
|
||||
|
@ -203,14 +203,13 @@ static inline void up_registerdump(void)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -188,14 +188,13 @@ static inline void up_registerdump(void)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -196,14 +196,13 @@ static inline void up_registerdump(void)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -185,14 +185,13 @@ static inline void up_registerdump(void)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -196,14 +196,13 @@ static inline void up_registerdump(void)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -120,14 +120,13 @@ static void _up_assert(int errorcode)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -160,14 +160,13 @@ static inline void up_registerdump(void)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -120,14 +120,13 @@ static void _up_assert(int errorcode)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -125,14 +125,13 @@ static void _up_assert(int errorcode)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -125,14 +125,13 @@ static void _up_assert(int errorcode)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -121,14 +121,13 @@ static void _up_assert(int errorcode)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -335,14 +335,13 @@ static void _up_assert(int errorcode)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -350,14 +350,13 @@ static void _up_assert(int errorcode)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -111,14 +111,13 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -85,14 +85,13 @@ static void up_stackdump(uint64_t sp, uint64_t stack_base)
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -81,14 +81,13 @@
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -104,14 +104,13 @@ static void _up_assert(int errorcode) /* noreturn_function */
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
|
@ -103,14 +103,13 @@ static void _up_assert(int errorcode) /* noreturn_function */
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_EMERG, fmt, &ap);
|
||||
vsyslog(LOG_EMERG, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
|
||||
|
@ -100,14 +100,13 @@ static usbtrace_idset_t g_maskedidset = CONFIG_USBDEV_TRACE_INITIALIDSET;
|
||||
static int usbtrace_syslog(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_INFO, fmt, &ap);
|
||||
vsyslog(LOG_INFO, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -143,14 +143,13 @@ static struct usbmon_state_s g_usbmonitor;
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
/* Let nx_vsyslog do the real work */
|
||||
/* Let vsyslog do the real work */
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = nx_vsyslog(LOG_INFO, fmt, &ap);
|
||||
vsyslog(LOG_INFO, fmt, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int usbmonitor_tracecallback(struct usbtrace_s *trace, void *arg)
|
||||
|
Loading…
Reference in New Issue
Block a user