File 5ddd25f9-EFI-fix-efi=attr-handling.patch of Package xen.13549
# Commit 5530782cfe70ed22fe44358f6a10c38916443b42
# Date 2019-11-26 14:17:45 +0100
# Author Jan Beulich <jbeulich@suse.com>
# Committer Jan Beulich <jbeulich@suse.com>
EFI: fix "efi=attr=" handling
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>
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -1409,9 +1409,9 @@ static int __init parse_efi_param(const
}
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;