Using libvir ..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Resending my earlier query ..
Hello,
I have tried writing a simple program.
I have compiled it with
cc xmlist.c -L
/usr/src/redhat/BUILD/libvir-0.0.1/src/.libs -lvir -o
xmlist
But am getting an error on trying after the
virConnectOpen call .
Any help would be appreciated .
                 Rgds,
                 Dakshina


Here is the code :xmlist.c

#include <stdio.h>
#include <libvir.h>

main(){
virConnectPtr conn;
int *domids ;
int maxids = 20;
int numDoms=-1;
conn=virConnectOpen("");
if(conn == NULL){
  printf("Error : Could not open a connection \n");
  return(-1);
}

numDoms=virConnectListDomains(conn,domids,maxids);

printf("The number of domains %d\n",numDoms);
printf("The number of! domains %d\n",
virConnectNumOfDomains(conn));
}
 cc xmlist.c -L
/usr/src/redhat/BUILD/libvir-0.0.1/src/.libs -lvir -o
xmlist



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]