yamt commented on code in PR #15320:
URL: https://github.com/apache/nuttx/pull/15320#discussion_r1896999271


##########
libs/libc/stdio/lib_libvsprintf.c:
##########
@@ -911,6 +915,11 @@ static int vsprintf_internal(FAR struct lib_outstream_s 
*stream,
           size = 1;
           goto str_lpad;
 
+        case 'm': /* Print error message (%m) */
+          pnt = strerror(saved_errno);
+          size = strlen(pnt); /* Adjusting the size is not supported by %m */
+          goto str_lpad;
+

Review Comment:
   > > probably you can avoid errno access depending on the context.
   > > (using `up_interrupt_context` etc)
   > 
   > That won't tell you if you are running in a kernel thread or if you are in 
a system call.
   
   sure, besides that, i guess you should check OSINIT_xxx as well.



-- 
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

Reply via email to