From fa365e85f53123e867e8293b7b0c154c6b070f65 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 20 Jun 2016 06:10:56 -0600 Subject: [PATCH] Update some cmoments --- drivers/syslog/vlowsyslog.c | 4 ++++ drivers/syslog/vsyslog.c | 4 ++++ include/nuttx/syslog/syslog.h | 4 ++++ libc/syslog/lib_lowsyslog.c | 7 ++++++- libc/syslog/lib_syslog.c | 7 ++++++- 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/syslog/vlowsyslog.c b/drivers/syslog/vlowsyslog.c index e3e4051617..7e44474882 100644 --- a/drivers/syslog/vlowsyslog.c +++ b/drivers/syslog/vlowsyslog.c @@ -62,6 +62,10 @@ * equivalent to vlowsyslog() except that the pre-process priority filtering * has already been performed and, hence, there is no priority argument. * + * 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. + * ****************************************************************************/ int _lowvsyslog(FAR const IPTR char *fmt, FAR va_list *ap) diff --git a/drivers/syslog/vsyslog.c b/drivers/syslog/vsyslog.c index fc9b9a1b9d..8d51c4ad5c 100644 --- a/drivers/syslog/vsyslog.c +++ b/drivers/syslog/vsyslog.c @@ -60,6 +60,10 @@ * equivalent to vsyslog() except that the pre-process priority filtering * has already been performed and, hence, there is no priority argument. * + * 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. + * ****************************************************************************/ int _vsyslog(FAR const IPTR char *fmt, FAR va_list *ap) diff --git a/include/nuttx/syslog/syslog.h b/include/nuttx/syslog/syslog.h index 18d20c98d2..d38b873217 100644 --- a/include/nuttx/syslog/syslog.h +++ b/include/nuttx/syslog/syslog.h @@ -214,6 +214,10 @@ int syslog_flush(void); * equivalent to vsyslog() except that the pre-process priority filtering * has already been performed and, hence, there is no priority argument. * + * 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. + * ****************************************************************************/ int _vsyslog(FAR const IPTR char *src, FAR va_list *ap); diff --git a/libc/syslog/lib_lowsyslog.c b/libc/syslog/lib_lowsyslog.c index d86ab394ff..4f823911c6 100644 --- a/libc/syslog/lib_lowsyslog.c +++ b/libc/syslog/lib_lowsyslog.c @@ -78,7 +78,12 @@ int lowvsyslog(int priority, FAR const IPTR char *fmt, va_list ap) if ((g_syslog_mask & LOG_MASK(priority)) != 0) { - /* Perform the _lowvsyslog system call */ + /* Perform the _lowvsyslog 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 = _lowvsyslog(fmt, &ap); } diff --git a/libc/syslog/lib_syslog.c b/libc/syslog/lib_syslog.c index 700b99b48c..ec9ca3b7e5 100644 --- a/libc/syslog/lib_syslog.c +++ b/libc/syslog/lib_syslog.c @@ -67,7 +67,12 @@ 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 cal */ + /* Yes.. lPerform 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); }