[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 6/6] xen: add runtime parameter reading support to hypfs
On 02.10.2019 13:20, Juergen Gross wrote: > Add support to read values of hypervisor runtime parameters via the > hypervisor file system for all unsigned integer type runtime parameters. What about string ones (which you seem to handle in the code, but see also there)? > @@ -320,6 +321,44 @@ int cmdline_strcmp(const char *frag, const char *name) > } > } > > +static struct hypfs_dir hypfs_params = { > + .list = LIST_HEAD_INIT(hypfs_params.list), > +}; > + > +static int __init runtime_param_hypfs_add(void) > +{ > + const struct kernel_param *param; > + int ret; > + > + ret = hypfs_new_dir(&hypfs_root, "params", &hypfs_params); > + BUG_ON(ret); > + > + for ( param = __param_start; param < __param_end; param++ ) > + { > + switch ( param->type ) > + { > + case OPT_UINT: > + if ( param->len == sizeof(unsigned int) ) > + ret = hypfs_new_entry_uint(&hypfs_params, param->name, > + (unsigned int *)(param->par.var)); Stray pair or parentheses. I also don't see the need for the cast, with the "var" union member being "void *". > + break; > + > + case OPT_STR: > + ret = hypfs_new_entry_uint(&hypfs_params, param->name, > + param->par.var); hypfs_new_entry_string()? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |