From 5073bf1de6a18ec47302ae96c7ce643e9872828d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 13 Jun 2016 07:02:45 -0600 Subject: [PATCH] Update some comments --- include/syslog.h | 14 +++++--------- libc/syslog/lib_setlogmask.c | 6 +++++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/syslog.h b/include/syslog.h index 6c1316a7e6..efc62ac599 100644 --- a/include/syslog.h +++ b/include/syslog.h @@ -128,14 +128,6 @@ #define LOG_UPTO(p) ((1 << (p)) - 1) #define LOG_ALL 0xff -/**************************************************************************** - * Public Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ @@ -225,8 +217,12 @@ int lowvsyslog(int priority, FAR const IPTR char *format, va_list ap); * to a priority p is LOG_MASK(p); LOG_UPTO(p) provides the mask of all * priorities in the above list up to and including p. * + * Per OpenGroup.org "If the maskpri argument is 0, the current log mask + * is not modified." In this implementation, the value zero is permitted + * in order to disable all syslog levels. + * * REVISIT: Per POSIX the syslog mask should be a per-process value but in - * NuttX, the scope of the mask is dependent on the nature of the build. + * NuttX, the scope of the mask is dependent on the nature of the build: * * Flat Build: There is one, global SYSLOG mask that controls all output. * Protected Build: There are two SYSLOG masks. One within the kernel diff --git a/libc/syslog/lib_setlogmask.c b/libc/syslog/lib_setlogmask.c index 84352411bd..1d91d40555 100644 --- a/libc/syslog/lib_setlogmask.c +++ b/libc/syslog/lib_setlogmask.c @@ -70,8 +70,12 @@ uint8_t g_syslog_mask = LOG_ALL; * to a priority p is LOG_MASK(p); LOG_UPTO(p) provides the mask of all * priorities in the above list up to and including p. * + * Per OpenGroup.org "If the maskpri argument is 0, the current log mask + * is not modified." In this implementation, the value zero is permitted + * in order to disable all syslog levels. + * * REVISIT: Per POSIX the syslog mask should be a per-process value but in - * NuttX, the scope of the mask is dependent on the nature of the build. + * NuttX, the scope of the mask is dependent on the nature of the build: * * Flat Build: There is one, global SYSLOG mask that controls all output. * Protected Build: There are two SYSLOG masks. One within the kernel