On Wed, Mar 18, 2009 at 10:26:01PM +0100, "Abel M?guez Rodr?guez" wrote: > Hi all, > > I'm sorry, I apologize for the format used. > thanks, > > > Hi all, > > > We have updated the OpenNebula Driver to libvirt version 0.6.1. > > Now, the ONE driver is build at the libvirtd daemon, that is the natural place for it. > > > Please feel free to make any comment, to improve the driver's coherence with libvirt's structure. > > > I split the Patches in two e-mais: > > [PATCH 1/2] includes the patches to be applied to libvirt's sources and building files. > > [PATCH 2/2] attached the "one driver" source files. > > >All the patches are made to be applied at the git commit: > >"025b62" (Fix subsystem lookup for older HAL releases) I've applied these patches and tried to build, but there's a number of compilation problems cc1: warnings being treated as errors virterror.c: In function 'virErrorDomainName': virterror.c:81: error: enumeration value 'VIR_FROM_ONE' not handled in switch cc1: warnings being treated as errors one_conf.c: In function 'oneSubmitVM': one_conf.c:119: error: implicit declaration of function 'c_oneAllocate' one_conf.c:119: error: nested extern declaration of 'c_oneAllocate' one_conf.c: In function 'xmlOneTemplate': one_conf.c:146: error: unused variable 'buf' cc1: warnings being treated as errors one_driver.c: In function 'oneDomainGetInfo': one_driver.c:334: error: implicit declaration of function 'c_oneVmInfo' one_driver.c:334: error: nested extern declaration of 'c_oneVmInfo' one_driver.c: In function 'oneDomainStart': one_driver.c:410: error: unused variable 'logfile' one_driver.c:409: error: unused variable 'rc' one_driver.c: In function 'oneDomainShutdown': one_driver.c:496: error: implicit declaration of function 'c_oneShutdown' one_driver.c:496: error: nested extern declaration of 'c_oneShutdown' one_driver.c:505: error: too many arguments for format one_driver.c: In function 'oneDomainDestroy': one_driver.c:536: error: too many arguments for format one_driver.c: In function 'oneDomainSuspend': one_driver.c:565: error: implicit declaration of function 'c_oneSuspend' one_driver.c:565: error: nested extern declaration of 'c_oneSuspend' one_driver.c: In function 'oneDomainResume': one_driver.c:598: error: implicit declaration of function 'c_oneResume' one_driver.c:598: error: nested extern declaration of 'c_oneResume' one_driver.c: In function 'oneStartup': one_driver.c:634: error: implicit declaration of function 'c_oneStart' one_driver.c:634: error: nested extern declaration of 'c_oneStart' one_driver.c:623: error: unused variable 'i' one_driver.c: In function 'oneShutdown': one_driver.c:659: error: implicit declaration of function 'c_oneFree' one_driver.c:659: error: nested extern declaration of 'c_oneFree' one_driver.c: At top level: one_driver.c:742: error: initialization from incompatible pointer type one_driver.c:760: error: missing initializer one_driver.c:760: error: (near initialization for 'oneDriver.nodeDeviceDettach') make: *** [one_driver.lo] Error 1 If you run the 'configure' or 'autogen.sh' passing --enable-compile-warnings=error then you'll see these problems during compilation. Also, when running 'make syntax-check' there are a number of new failures introduced by this patch, when trailing whitespace in the files src/Makefile.am:142: one_driver.c one_driver.h src/domain_conf.c:59: src/libvirt.c:836:#endif Makefile.maint: found trailing blank(s) make: *** [sc_trailing_blank] Error 1 > diff --git a/src/domain_conf.h b/src/domain_conf.h > index dd61467..e8a2bff 100644 > --- a/src/domain_conf.h > +++ b/src/domain_conf.h > @@ -48,6 +48,7 @@ enum virDomainVirtType { > VIR_DOMAIN_VIRT_TEST, > VIR_DOMAIN_VIRT_VMWARE, > VIR_DOMAIN_VIRT_HYPERV, > + VIR_DOMAIN_VIRT_ONE, > > VIR_DOMAIN_VIRT_LAST, > }; > diff --git a/src/driver.h b/src/driver.h > index 62d6fbc..ed3eef7 100644 > --- a/src/driver.h > +++ b/src/driver.h > @@ -20,6 +20,7 @@ typedef enum { > VIR_DRV_OPENVZ = 5, > VIR_DRV_LXC = 6, > VIR_DRV_UML = 7, > + VIR_DRV_ONE = 8, > } virDrvNo; > > > diff --git a/src/libvirt.c b/src/libvirt.c > index bf3453a..cd4b5b7 100644 > --- a/src/libvirt.c > +++ b/src/libvirt.c > @@ -830,6 +830,10 @@ virGetVersion(unsigned long *libVer, const char *type, > if (STRCASEEQ(type, "OpenVZ")) > *typeVer = LIBVIR_VERSION_NUMBER; > #endif > +#if WITH_ONE > + if (STRCASEEQ(type, "ONE")) > + *typeVer = LIBVIR_VERSION_NUMBER; > +#endif > #if WITH_UML > if (STRCASEEQ(type, "UML")) > *typeVer = LIBVIR_VERSION_NUMBER; > > This patch all basically looks sane for integration into libvirt driver code, aside from the warnings I mention above. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list