Skip to contentSkip to conversation

EFI: fix "efi=attr=" handling

PATCH In review Jan Beulich 5 participants 5 messages Nov 26, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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().

xen/common/efi/boot.c +2 -2
@@ -1430,9 +1430,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;

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jan Beulich

Commit 633a40947321 ("docs: Improve documentation and parsing for efi=") failed to honor the strcmp()-like return value convention of cmdline_strcmp().

Quoted 5 lines
xen/common/efi/boot.c +0 -0
@@ -1430,9 +1430,9 @@ static int __init parse_efi_param(const
         }

xen/common/efi/boot.c static int __init parse_efi_param(const · line 1438

Quoted 10 lines
xen/common/efi/boot.c +2 -2
         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;

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
Quoted 10 lines · Wei Liu
Quoted 6 lines · Jan Beulich

Commit 633a40947321 ("docs: Improve documentation and parsing for efi=") failed to honor the strcmp()-like return value convention of cmdline_strcmp().

Thanks,
Roman.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
In reply to Jan Beulich
Quoted 6 lines · Jan Beulich

Commit 633a40947321 ("docs: Improve documentation and parsing for efi=") failed to honor the strcmp()-like return value convention of cmdline_strcmp().

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reviewed-by on v1 1/1
#4 lore raw
In reply to Jan Beulich
Quoted 6 lines · Jan Beulich

Commit 633a40947321 ("docs: Improve documentation and parsing for efi=") failed to honor the strcmp()-like return value convention of cmdline_strcmp().

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel