[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] libxenserver : xen_vm_get_record() fails with SIGSEGV
Hi, Sane, Abhijeet wrote: Hi , I am getting a SIGSEGV when calling xen_vm_get_record() function. Please guide me if I am doing anything wrong. <CodeSnippet> struct xen_vm_set * vm_list = NULL; //xen_vm_get_all(session,&vm_list); xen_host_get_resident_vms(session,&vm_list,host); if ( NULL == vm_list ) { print_error(session); xen_host_free(host); cleanup(); return 1; } printf("Total number of virtual machines found on Xen Server %d\n",vm_list->size); for(int i = 0 ; i < vm_list->size ; i++) { xen_vm_record * vm_rec = NULL; printf("Trying to get VM record\n"); //--- This is where it failsxen_vm_get_record(session,&vm_rec ,*( vm_list->contents[i])); You don't want to dereference that pointer, so just remove the *. Goncalo. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |