You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by li...@apache.org on 2024/10/15 07:33:19 UTC
(nuttx) 01/02: lib_libvsprintf.c: Add support for %pB parameter.
This is an automated email from the ASF dual-hosted git repository.
ligd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 83914d5b29f69f216005253284bac134e90d6e84
Author: likun17 <li...@xiaomi.com>
AuthorDate: Fri Feb 2 14:26:25 2024 +0800
lib_libvsprintf.c: Add support for %pB parameter.
Signed-off-by: likun17 <li...@xiaomi.com>
---
libs/libc/stdio/lib_libvsprintf.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libs/libc/stdio/lib_libvsprintf.c b/libs/libc/stdio/lib_libvsprintf.c
index 3df402d7e9..0c4cdd8deb 100644
--- a/libs/libc/stdio/lib_libvsprintf.c
+++ b/libs/libc/stdio/lib_libvsprintf.c
@@ -1122,6 +1122,14 @@ str_lpad:
c = fmt_char(fmt);
switch (c)
{
+ case 'B':
+ {
+ FAR struct va_format *vaf = (FAR void *)(uintptr_t)x;
+
+ lib_bsprintf(stream, vaf->fmt, vaf->va);
+ continue;
+ }
+
case 'V':
{
FAR struct va_format *vaf = (FAR void *)(uintptr_t)x;