]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commitdiff
xen/cmdline: fix printf format specifier in no_config_param()
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 27 Feb 2024 13:10:39 +0000 (14:10 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 27 Feb 2024 13:10:39 +0000 (14:10 +0100)
'*' sets the width field, which is the minimum number of characters to output,
but what we want in no_config_param() is the precision instead, which is '.*'
as it imposes a maximum limit on the output.

Fixes: 68d757df8dd2 ('x86/pv: Options to disable and/or compile out 32bit PV support')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: ef101f525173cf51dc70f4c77862f6f10a8ddccf
master date: 2024-02-26 10:17:40 +0100

xen/include/xen/param.h

index 93c3fe7cb797c1fc4790e377472427af809d6998..e02e49635cc32a3fb74ad5b3f17249bc320b2101 100644 (file)
@@ -191,7 +191,7 @@ static inline void no_config_param(const char *cfg, const char *param,
 {
     int len = e ? ({ ASSERT(e >= s); e - s; }) : strlen(s);
 
-    printk(XENLOG_INFO "CONFIG_%s disabled - ignoring '%s=%*s' setting\n",
+    printk(XENLOG_INFO "CONFIG_%s disabled - ignoring '%s=%.*s' setting\n",
            cfg, param, len, s);
 }