Need to pass va_list as a reference to vsyslog. This is because va_list is a structure in some compilers and passing of structures in the NuttX sycalls does not work.
This commit is contained in:
parent
690a0e7a6e
commit
7dd66a4620
|
@ -64,14 +64,14 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
int _lowvsyslog(FAR const IPTR char *fmt, va_list ap)
|
||||
int _lowvsyslog(FAR const IPTR char *fmt, FAR va_list *ap)
|
||||
{
|
||||
struct lib_outstream_s stream;
|
||||
|
||||
/* Wrap the stdout in a stream object and let lib_vsprintf do the work. */
|
||||
|
||||
syslogstream((FAR struct lib_outstream_s *)&stream);
|
||||
return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, ap);
|
||||
return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, *ap);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ARCH_LOWPUTC */
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
int _vsyslog(FAR const IPTR char *fmt, va_list ap)
|
||||
int _vsyslog(FAR const IPTR char *fmt, FAR va_list *ap)
|
||||
{
|
||||
struct lib_outstream_s stream;
|
||||
#ifdef CONFIG_SYSLOG_TIMESTAMP
|
||||
|
@ -96,5 +96,5 @@ int _vsyslog(FAR const IPTR char *fmt, va_list ap)
|
|||
|
||||
#endif
|
||||
|
||||
return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, ap);
|
||||
return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, *ap);
|
||||
}
|
||||
|
|
|
@ -216,8 +216,8 @@ int syslog_flush(void);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
int _vsyslog(FAR const IPTR char *src, va_list ap);
|
||||
int _lowvsyslog(FAR const IPTR char *src, va_list ap);
|
||||
int _vsyslog(FAR const IPTR char *src, FAR va_list *ap);
|
||||
int _lowvsyslog(FAR const IPTR char *src, FAR va_list *ap);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -80,7 +80,7 @@ int lowvsyslog(int priority, FAR const IPTR char *fmt, va_list ap)
|
|||
{
|
||||
/* Perform the _lowvsyslog system call */
|
||||
|
||||
ret = _lowvsyslog(fmt, ap);
|
||||
ret = _lowvsyslog(fmt, &ap);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -69,7 +69,7 @@ int vsyslog(int priority, FAR const IPTR char *fmt, va_list ap)
|
|||
{
|
||||
/* Yes.. lPerform the _vsyslog system cal */
|
||||
|
||||
ret = _vsyslog(fmt, ap);
|
||||
ret = _vsyslog(fmt, &ap);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -159,7 +159,7 @@
|
|||
"up_assert","assert.h","","void","FAR const uint8_t*","int"
|
||||
#"up_assert","assert.h","","void"
|
||||
"vfork","unistd.h","defined(CONFIG_ARCH_HAVE_VFORK)","pid_t"
|
||||
"_vsyslog","syslog.h","","int","FAR const IPTR char*","va_list"
|
||||
"_vsyslog","syslog.h","","int","FAR const IPTR char*","FAR va_list*"
|
||||
"wait","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","pid_t","int*"
|
||||
"waitid","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","int","idtype_t","id_t"," FAR siginfo_t *","int"
|
||||
"waitpid","sys/wait.h","defined(CONFIG_SCHED_WAITPID)","pid_t","pid_t","int*","int"
|
||||
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
Loading…
Reference in New Issue