]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
EFI: fix "efi=attr=" handling
authorJan Beulich <jbeulich@suse.com>
Tue, 26 Nov 2019 13:17:45 +0000 (14:17 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 26 Nov 2019 13:17:45 +0000 (14:17 +0100)
Commit 633a40947321 ("docs: Improve documentation and parsing for efi=")
failed to honor the strcmp()-like return value convention of
cmdline_strcmp().

Reported-by: Roman Shaposhnik <roman@zededa.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wl@xen.org>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/common/efi/boot.c

index a8b6f39721fb55e9307782c5b9abb9757c56973c..3f1c330afec2c675636b73b00ee89c1734230d47 100644 (file)
@@ -1430,9 +1430,9 @@ static int __init parse_efi_param(const char *s)
         }
         else if ( (ss - s) > 5 && !memcmp(s, "attr=", 5) )
         {
-            if ( cmdline_strcmp(s + 5, "uc") )
+            if ( !cmdline_strcmp(s + 5, "uc") )
                 efi_map_uc = true;
-            else if ( cmdline_strcmp(s + 5, "no") )
+            else if ( !cmdline_strcmp(s + 5, "no") )
                 efi_map_uc = false;
             else
                 rc = -EINVAL;