|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v4 15/53] 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>
Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
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 5b0e55d7d9..3052cb0788 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -179,14 +179,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, NULL);
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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |