kexec: suppress bogus warning
authorJan Beulich <jbeulich@suse.com>
Tue, 12 Mar 2019 13:39:13 +0000 (14:39 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Mar 2019 13:39:13 +0000 (14:39 +0100)
Till now "crashkernel=1G-16G:1M" causes

(XEN) crashkernel: '' ignored
(XEN) parameter "crashkernel" has invalid value "1G-16G:1M", rc=-22!

Don't emit the "ignored" warning when there's no placement specification
and the tail of the specified option is actually empty.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/kexec.c

index c14cbb2b9c818a097fdf595c3a15d75da22cd99c..a262cc5a18bfcd148dadd25fd79ab3bc936ebcef 100644 (file)
@@ -173,7 +173,7 @@ static int __init parse_crashkernel(const char *str)
             kexec_crash_area_limit = parse_size_and_unit(cur = str + 1, &str);
         else if ( !strncmp(str, ",below=", 7) )
             kexec_crash_area_limit = parse_size_and_unit(cur = str + 7, &str);
-        else
+        else if ( *str )
         {
             printk(XENLOG_WARNING "crashkernel: '%s' ignored\n", str);
             rc = -EINVAL;