Otpvondoiats commented on PR #13536:
URL: https://github.com/apache/nuttx/pull/13536#issuecomment-2362909512

   > > > > > This is a new function that implements the method of printing the 
serialized data of the structure in a similar way to %pV %pS.
   > > > > 
   > > > > 
   > > > > i was not aware of %pV and %pS. their way to extend the 
functionality seems quite broken as it prevents us from providing standard %p.
   > > > 
   > > > 
   > > > Linux kernel uses the similar approach to extend the format specifier: 
[https://www.[kernel.org/doc/Documentation/printk-formats.txt](https://www.kernel.org/doc/Documentation/printk-formats.txt)](https://www.%5Bkernel.org/doc/Documentation/printk-formats.txt%5D(https://www.kernel.org/doc/Documentation/printk-formats.txt))
   > > 
   > > 
   > > printk is a non-standard linux-internal api, which isn't meant to 
conform any standards.
   > > > > please don't follow the mistake.
   > > > 
   > > > 
   > > > Could you give more info why it isn't good?
   > > 
   > > 
   > > printf("%pS", NULL) should yield something like "0x0S".
   > > besides that, these kinds of extensions are not recognized by the 
compiler's `__format__` attribute.
   > 
   > Ok, @Otpvondoiats let's add an option in Kconfig to control this special 
format specifier.
   
   Get


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to