>>> On 15.08.17 at 17:57, <jgr...@suse.com> wrote: > On 15/08/17 17:39, Jan Beulich wrote: >>>>> On 14.08.17 at 09:08, <jgr...@suse.com> wrote: >>> +struct xen_sysctl_set_parameter { >>> + XEN_GUEST_HANDLE_64(char) params; /* IN: pointer to parameters. >>> */ >>> + uint16_t size; /* IN: size of parameters. Max. >>> + XEN_SET_PARAMETER_MAX_SIZE. >>> */ >> >> You could even allow querying the size by passing in a null handle >> and returning the value in the size field. > > Would this help in any way?
Since the caller won't want to dimension the buffer dynamically, perhaps not much. The only use I could see would be to give a better error message for too long strings than the one resulting from strerror(). I.e. ... > Maybe just returning E2BIG would be enough? ... maybe yes. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel