[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 05/13] xen-xsplice: Tool to manipulate xsplice payloads (v3)
On Thu, Jan 14, 2016 at 04:47:03PM -0500, Konrad Rzeszutek Wilk wrote: [...] > +/* This value was choosen adhoc. It could be 42 too. */ > +#define MAX_LEN 11 > +static int list_func(int argc, char *argv[]) > +{ > + unsigned int idx, done, left, i; > + xen_xsplice_status_t *info = NULL; > + char *id = NULL; > + uint32_t *len = NULL; > + int rc = ENOMEM; > + > + if ( argc ) > + { > + show_help(); > + return -1; > + } > + idx = left = 0; > + info = malloc(sizeof(*info) * MAX_LEN); > + if ( !info ) > + goto out; > + id = malloc(sizeof(*id) * XEN_XSPLICE_NAME_SIZE * MAX_LEN); > + if ( !id ) > + goto out; > + len = malloc(sizeof(*len) * MAX_LEN); > + if ( !len ) > + goto out; > + > + fprintf(stdout," ID | status\n" > + > "----------------------------------------+------------\n"); > + do { > + done = 0; > + memset(info, 'A', sizeof(*info) * MAX_LEN); /* Optional. */ > + memset(id, 'i', sizeof(*id) * MAX_LEN * XEN_XSPLICE_NAME_SIZE); /* > Optional. */ Line too long. [...] > +static int upload_func(int argc, char *argv[]) > +{ > + char *filename; > + char id[XEN_XSPLICE_NAME_SIZE]; > + int fd = 0, rc; > + struct stat buf; > + unsigned char *fbuf; > + ssize_t len; > + DECLARE_HYPERCALL_BUFFER(char, payload); > + I don't think you need to declare hypercall buffer here in the utility. It should be libxc's responsibility to bounce the buffer accordingly. Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |