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@citrix.com>
Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com>
This commit is contained in:
Andrew Cooper committed 2026-09-01 22:33:57 +01:00
1 parent 2565341135
commit a4049dd6ac
1 file changed
+6 -3
+6 -3
View File
@@ -80,8 +80,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_argo_unregister_ring_t);
DEFINE_COMPAT_HANDLE(compat_argo_iov_t); DEFINE_COMPAT_HANDLE(compat_argo_iov_t);
#endif #endif
static bool __read_mostly opt_argo; static bool __ro_after_init opt_argo;
static bool __read_mostly opt_argo_mac_permissive; static bool __ro_after_init opt_argo_mac_permissive;
static int __init cf_check parse_argo(const char *s) 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 ) if ( !ss )
ss = strchr(s, '\0'); 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; opt_argo = val;
else if ( (val = parse_boolean("mac-permissive", s, ss)) >= 0 ) else if ( (val = parse_boolean("mac-permissive", s, ss)) >= 0 )
opt_argo_mac_permissive = val; opt_argo_mac_permissive = val;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.