Simpler Vimage sysctls
Julian Elischer
julian at elischer.org
Sat Jul 12 01:55:26 UTC 2008
James Gritton wrote:
> While working on combining jail_set and Vimage, I found that the sysctl
> virtualization hacks were more complicated than they needed to be.
>
> The extra "subs" and "mod" arguments in SYSCTL_HANDLER_V_ARGS don't need
> to be explicitly passed because they're members of the sysctl_v_oid
> structure passed in the oidp argument. By using oidp->oid_v_subs
> instead of subs (and same for mod), SYSCTL_HANDLER_V_ARGS becomes the
> same as SYSCTL_HANDLER_ARGS, and no longer need to be defined.
I've only looked at the sysctl macros supreficially but assumed
that the redundant information was forward looking, and that there
was support for future changes there.
>
> With the handlers now taking the same arguments, the sysctl_oid and
> sysctl_v_oid structures become identical and sysctl_v_oid can go away.
>
> Unrelated to this is the various SYSCTL_V_XXX macros that refer to
> either SYSCTL_V_OID or SYSCTL_OID depending on the VIMAGE define. Since
> SYSCTL_V_OID already reduces to SYSCTL_OID if VIMAGE is undefined, those
> further switches are unnecessary.
umm but they call different code..
>
> I'm including a diff that trims all this away, while keeping the same
> functionality.
>
> - Jamie
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> freebsd-virtualization at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe at freebsd.org"
More information about the freebsd-virtualization
mailing list