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

[xen master] xen/argo: Command line handling improvements



commit a4049dd6acf4527bb684a066510c1cf34292d5e1
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Tue May 20 15:03:45 2025 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Sep 1 22:33:57 2026 +0100

    xen/argo: Command line handling improvements
    
    Treat "argo" on the command line as a positive boolean, rather than 
requiring
    the user to pass "argo=1/on/enable/true".
    
    Move both opt_argo* variables into __ro_after_init.  They're set during
    command line parsing and never modified thereafter.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
 xen/common/argo.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/common/argo.c b/xen/common/argo.c
index 42dd516a18..0b9a54db36 100644
--- a/xen/common/argo.c
+++ b/xen/common/argo.c
@@ -80,8 +80,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_argo_unregister_ring_t);
 DEFINE_COMPAT_HANDLE(compat_argo_iov_t);
 #endif
 
-static bool __read_mostly opt_argo;
-static bool __read_mostly opt_argo_mac_permissive;
+static bool __ro_after_init opt_argo;
+static bool __ro_after_init opt_argo_mac_permissive;
 
 static int __init cf_check parse_argo(const char *s)
 {
@@ -93,7 +93,10 @@ static int __init cf_check parse_argo(const char *s)
         if ( !ss )
             ss = strchr(s, '\0');
 
-        if ( (val = parse_bool(s, ss)) >= 0 )
+        /* Intepret "argo" as a positive boolean. */
+        if ( *s == '\0' )
+            opt_argo = true;
+        else if ( (val = parse_bool(s, ss)) >= 0 )
             opt_argo = val;
         else if ( (val = parse_boolean("mac-permissive", s, ss)) >= 0 )
             opt_argo_mac_permissive = val;
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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