diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2024-11-20 15:58:56 +0100 |
---|---|---|
committer | Alexander Gordeev <agordeev@linux.ibm.com> | 2025-01-26 17:23:59 +0100 |
commit | dccac2b22b1cabb37b141f7df5bebbcf10a2b44d (patch) | |
tree | 94fefe6a7f9d98b3a08e3fb1b4dd7f54f8b7e5f6 | |
parent | 490a5e99ead57b16045a8e968fd8bc5fdcbfc90c (diff) |
s390/boot: Add %% support to boot_printk()
Add "%%" support for the boot_printk() format string.
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
-rw-r--r-- | arch/s390/boot/printk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/s390/boot/printk.c b/arch/s390/boot/printk.c index 35f18f2b936e..313b11daa353 100644 --- a/arch/s390/boot/printk.c +++ b/arch/s390/boot/printk.c @@ -94,7 +94,11 @@ void boot_printk(const char *fmt, ...) *p++ = *fmt; continue; } - pad = isdigit(*++fmt) ? simple_strtol(fmt, (char **)&fmt, 10) : 0; + if (*++fmt == '%') { + *p++ = '%'; + continue; + } + pad = isdigit(*fmt) ? simple_strtol(fmt, (char **)&fmt, 10) : 0; switch (*fmt) { case 's': p = buf + strlcat(buf, va_arg(args, char *), sizeof(buf)); |