diff --git a/include/syslog.h b/include/syslog.h index 6c1316a7e61..efc62ac599d 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 84352411bd9..1d91d405558 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