[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] Fwd: [Xen-devel] libxen-light
---------- Forwarded message ---------- From: kumara rathnavel <kumara.bsd@xxxxxxxxx> Date: 21 September 2015 at 17:17 Subject: Re: [Xen-devel] libxen-light To: Ian Campbell <ian.campbell@xxxxxxxxxx> Thanks for the reply Ian. Please find the code below.. I have also attached the output files from the command truss... The one prefixed with xl is generated when command is successful The other one is from the code generated the SEGFAULT. Thank You,.. #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/syslog.h> #include <libxl.h> #include <libxl_utils.h> #include <libxlutil.h> #include <fcntl.h> #define INVALID_DOMID 0 #define LIBXL__DEFBOOL_FALSE (-1) #define LIBXL__DEFBOOL_TRUE (1) int main(     Âint argc,     Âchar **argv    ) {  Âlibxl_ctx *ctx;  Âint rc = 0;  Âlibxl_device_nic nic;  Âint domid = 0;  Âchar *bridge = NULL;  Âbridge = "bridge0";  Âlibxl_device_nic_init(&nic);  Âdomid = 2; //Have a domain running with ID 2.  Ârc = libxl_ctx_alloc(&ctx, LIBXL_VERSION, 0, NULL);  Âif (rc < 0) {    perror("ctx alloc failed.");    return rc;  Â}  Ânic.devid = -1;  Ânic.bridge = bridge;  Ânic.nictype = LIBXL_NIC_TYPE_VIF;  Ârc = libxl_device_nic_add(ctx, domid, &nic, 0);  Âif(rc != 0 ) {    printf("Attach Failed\n");  Â}  Âlibxl_ctx_free(ctx);  Âreturn rc; } On 21 September 2015 at 13:57, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote: On Mon, 2015-09-21 at 11:56 +0530, kumara rathnavel wrote: Attachment:
xlout Attachment:
eout _______________________________________________ Xen-api mailing list Xen-api@xxxxxxxxxxxxx http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |