From: Vasily Gorbik Date: Wed, 20 Nov 2024 14:58:56 +0000 (+0100) Subject: s390/boot: Add %% support to boot_printk() X-Git-Tag: v6.14-rc1~36^2~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dccac2b22b1cabb37b141f7df5bebbcf10a2b44d;p=thirdparty%2Fkernel%2Flinux.git s390/boot: Add %% support to boot_printk() Add "%%" support for the boot_printk() format string. Signed-off-by: Vasily Gorbik Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev --- diff --git a/arch/s390/boot/printk.c b/arch/s390/boot/printk.c index 35f18f2b936e0..313b11daa353c 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));