Modify the custom parameter parsing routines in:

xen/arch/x86/mm.c

to indicate whether the parameter value was parsed successfully.

Cc: Jan Beulich <jbeul...@suse.com>
Cc: Andrew Cooper <andrew.coop...@citrix.com>
Signed-off-by: Juergen Gross <jgr...@suse.com>
Acked-by: Wei Liu <wei.l...@citrix.com>
Acked-by: Jan Beulich <jbeul...@suse.com>
---
V3:
- cosmetic changes (Jan Beulich)
---
 xen/arch/x86/mm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 5b863c6fa6..5afb0c3e21 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -170,14 +170,20 @@ static uint32_t base_disallow_mask;
      L1_DISALLOW_MASK : (L1_DISALLOW_MASK & ~PAGE_CACHE_ATTRS))
 
 static s8 __read_mostly opt_mmio_relax;
-static void __init parse_mmio_relax(const char *s)
+
+static int __init parse_mmio_relax(const char *s)
 {
     if ( !*s )
         opt_mmio_relax = 1;
     else
         opt_mmio_relax = parse_bool(s);
     if ( opt_mmio_relax < 0 && strcmp(s, "all") )
+    {
         opt_mmio_relax = 0;
+        return -EINVAL;
+    }
+
+    return 0;
 }
 custom_param("mmio-relax", parse_mmio_relax);
 
-- 
2.12.3


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to