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>
This commit is contained in:
Vasily Gorbik 2024-11-20 15:58:56 +01:00 committed by Alexander Gordeev
parent 490a5e99ea
commit dccac2b22b
1 changed files with 5 additions and 1 deletions

View File

@ -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));