projects
/
platform
/
kernel
/
opensbi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6053917
)
lib: sbi: print not fill '0' when left-aligned
author
Xiang W
<wxjstz@126.com>
Sun, 9 Jul 2023 16:02:22 +0000
(
00:02
+0800)
committer
Anup Patel
<anup@brainfault.org>
Wed, 12 Jul 2023 04:18:49 +0000
(09:48 +0530)
Left alignment and padding '0' should not exist at the same time,
this patch skips padding.
Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_console.c
patch
|
blob
|
history
diff --git
a/lib/sbi/sbi_console.c
b/lib/sbi/sbi_console.c
index d87b5c20efc303daef52e8243c36f98c5a18f530..03ee05a11cb7cc4c58c9b0d6c0582f1f9411743e 100644
(file)
--- a/
lib/sbi/sbi_console.c
+++ b/
lib/sbi/sbi_console.c
@@
-288,6
+288,8
@@
static int print(char **out, u32 *out_len, const char *format, va_list args)
if (!flags_done)
++format;
}
+ if (flags & PAD_RIGHT)
+ flags &= ~PAD_ZERO;
/* Get width */
for (; *format >= '0' && *format <= '9'; ++format) {
width *= 10;