[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86/dom0: switch parse_dom0_param to use parse_boolean



commit fbc2bbdca38021109590d436c3e5099ff1a5b50d
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Tue Oct 9 11:42:32 2018 +0200
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Oct 15 14:34:53 2018 +0100

    x86/dom0: switch parse_dom0_param to use parse_boolean
    
    No functional change expected.
    
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/dom0_build.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c
index 86eb7db1da..dcd7afb058 100644
--- a/xen/arch/x86/dom0_build.c
+++ b/xen/arch/x86/dom0_build.c
@@ -225,16 +225,17 @@ static int __init parse_dom0_param(const char *s)
     int rc = 0;
 
     do {
+        int val;
 
         ss = strchr(s, ',');
         if ( !ss )
             ss = strchr(s, '\0');
 
-        if ( !strncmp(s, "pvh", ss - s) )
-            dom0_pvh = true;
+        if ( (val = parse_boolean("pvh", s, ss)) >= 0 )
+            dom0_pvh = val;
 #ifdef CONFIG_SHADOW_PAGING
-        else if ( !strncmp(s, "shadow", ss - s) )
-            opt_dom0_shadow = true;
+        else if ( (val = parse_boolean("shadow", s, ss)) >= 0 )
+            opt_dom0_shadow = val;
 #endif
         else
             rc = -EINVAL;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.