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

[Xen-devel] [PATCH 14/52] xen/arch/x86/mm.c: let custom parameter parsing routines return errno



Modify the custom parameter parsing routines in:

xen/arch/x86/mm.c

to indicate whether the parameter value was parsed successfully.

Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
 xen/arch/x86/mm.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 97b3b4ba2c..28d7ecf5df 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -170,14 +170,19 @@ 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@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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