michallenc opened a new pull request, #16280: URL: https://github.com/apache/nuttx/pull/16280
## Summary [POSIX states ](https://pubs.opengroup.org/onlinepubs/009695399/functions/setlogmask.html) > "If the maskpri argument is 0, the current log mask is not modified." The current implementation of `setlogmask` function in NuttX doesn't respect this and thus is in a clear violation with a strict POSIX compliance rule in The Inviolable Principles of NuttX. The current implementation doesn't allow to simply obtain the current logging level without changing it and also breaks the application's compatibility with other POSIX systems. This commit therefore changes the behavior to the expected one. Passing argument 0 doesn't change the current log mask, but just returns the old one. ## Impact This is a breaking change as it changes the behavior of `setlogmask` function call. However, the current implementation is wrong and in a violation with POSIX standard, therefore this should be changed. If there are applications that uses 0 argument to disable logging, then these would have to be fixed to behave in compliance with POSIX standard. The updated implementation should be the same as in Linux and other POSIX compliant systems. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org