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

[Xen-devel] [PATCH v3 03/52] xen/arch/arm/traps.c: let custom parameter parsing routines return errno



Modify the custom parameter parsing routines in:

xen/arch/arm/traps.c

to indicate whether the parameter value was parsed successfully.

Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Julien Grall <julien.grall@xxxxxxx>
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Acked-by: Julien Grall <julien.grall@xxxxxxx>
---
 xen/arch/arm/traps.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index c07999b518..f94ca1af02 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -108,12 +108,14 @@ static enum {
        NATIVE,
 } vwfi;
 
-static void __init parse_vwfi(const char *s)
+static int __init parse_vwfi(const char *s)
 {
        if ( !strcmp(s, "native") )
                vwfi = NATIVE;
        else
                vwfi = TRAP;
+
+       return 0;
 }
 custom_param("vwfi", parse_vwfi);
 
@@ -130,7 +132,7 @@ static enum {
     SERRORS_PANIC,
 } serrors_op;
 
-static void __init parse_serrors_behavior(const char *str)
+static int __init parse_serrors_behavior(const char *str)
 {
     if ( !strcmp(str, "forward") )
         serrors_op = SERRORS_FORWARD;
@@ -139,7 +141,7 @@ static void __init parse_serrors_behavior(const char *str)
     else
         serrors_op = SERRORS_DIVERSE;
 
-    return;
+    return 0;
 }
 custom_param("serrors", parse_serrors_behavior);
 
-- 
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®.