Re: [libvirt] Operation forbidden for read only access

2011-06-05 Thread Daniel Veillard
On Mon, Jun 06, 2011 at 08:41:51AM +0530, PREETHI RAMESH wrote:
> I'm using libvirt's Java API bindingsa and i've opened a connection :
[...]
> exception FOUR caught: org.libvirt.LibvirtException: operation
> virDomainDestroy forbidden for read only access
> level:VIR_ERR_ERROR
> code:VIR_ERR_OPERATION_DENIED
> domain:VIR_FROM_DOM
> hasConn:false
> hasDom:false
> hasNet:false
> message:operation virDomainDestroy forbidden for read only access
> str1:operation %s forbidden for read only access
> str2:virDomainDestroy
> str3:null
> int1:-1
> int2:-1
> 
> BUILD SUCCESSFUL (total time: 23 minutes 38 seconds)
> 
> I've used qemu:///system but why is my operation being denied?

  On a read-only connection any operation which may modify the state of
  the system will get denied. You need a read-write connection for
  destroying a domain.

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [libvirt-users] Release of libvirt-0.9.2

2011-06-05 Thread Daniel Veillard
  As planned the new release is available at:

  ftp://libvirt.org/libvirt/

It is a rather large release with near 400 commits included. From
an user point of view the main improvement is likely to be when
using migration as various work has been done to extend the protocol
and to avoid having the migration command stop other concurrent
operations (like virsh list). See below for a number of new features,
improvement and bug fixes:

Features:
- Framework for lock manager plugins (Daniel P. Berrange)
- API for network config change transactions (Michal Privoznik)
- flags for setting memory parameters (Hu Tao)
- virDomainGetState public API (Jiri Denemark)
- qemu: allow blkstat/blkinfo calls during migration (Federico Simoncelli)
- Introduce migration v3 API (Daniel P. Berrange)
- Defining the Screenshot public API (Michal Privoznik)
- public API for NMI injection (Lai Jiangshan)

Documentation:
- esx: Fix driver method version annotations (Matthias Bolte)
- vbox: Fix typo in error message (Matthias Bolte)
- virsh: Document nodeinfo output (Jiri Denemark)
- Correct 'cputune' documentation example. (Neil Wilson)
- document iface-* commands (Eric Blake)
- Add initial docs about the lock managers (Daniel P. Berrange)
- maint: use consistent file name for threading notes (Eric Blake)
- Fix virTypedParameter alias comments (Matthias Bolte)
- Fix error syntax of vcpupin example XML (Osier Yang)
- Automatically generate the hvsupport.html.in file from source files (Daniel 
P. Berrange)
- Fix documentation for cputune parameters (Osier Yang)
- avoid double 'the' (Eric Blake)
- Add documentation about test suites (Daniel Veillard)
- updates to CA cert and client cert/key info (Doug Goldstein)
- node filesystem attr is 'accessmode', not 'mode' (Cole Robinson)

Portability:
- vbox: Fix version extraction on Windows for newer VirtualBox versions 
(Matthias Bolte)
- Make dlopen usage in lock manager conditional (Matthias Bolte)
- build: fix VPATH build break from previous patch (Eric Blake)
- Remove call to deprecated gnutls_certificate_type_set_priority (Daniel P. 
Berrange)
- Fix sysinfo/virsh build problems on Win32 (Daniel P. Berrange)
- Fix build with --with-driver-modules enabled (Matthias Bolte)
- build: fix 'make dist' for ./configure --without-remote (Eric Blake)
- virsh: time_t is not a long on FreeBSD (Matthias Bolte)
- time_t is not a long on FreeBSD, switch internal type to long long (Matthias 
Bolte)
- build: avoid strerror_r pitfalls (Eric Blake)
- build: fix VIR_DEBUG on mingw (Eric Blake)
- build: generate files when building without libvirtd (Wen Congyang)
- build: drop unused sys/syslimits.h header (Eric Blake)
- Fix prototype of virRun for Win32 targets (Daniel P. Berrange)
- build: tolerate unlimited group size (Eric Blake)
- Disable virCommandExec on Win32 (Daniel P. Berrange)
- command: Fix compilation on FreeBSD (Matthias Bolte)
- apparmor: Fix compilation by removing remains from virCommand conversion 
(Matthias Bolte)
- configure: Fix mpath check on non-Linux systems (Matthias Bolte)
- fix xdr detection and use with recent glibc (Christophe Fergeau)
- build: avoid gcc preprocessor extensions (Eric Blake)
- build: fix VPATH build with distributed generated files (Eric Blake)
- build: fix VPATH builds (Eric Blake)

Bug fixes:
- Fix QEMU p2p v2 migration when run from a v3 client (Daniel P. Berrange)
- Don't raise an error if the migration cookie is NULL (Daniel P. Berrange)
- Fix check of virKillProcess return status (Daniel P. Berrange)
- qemu: Avoid use after free in qemuCaps parsing (Jiri Denemark)
- security driver: ignore EINVAL when chowning an image file (Laine Stump)
- migrate: detect xml incompatibility (Eric Blake)
- event: avoid memory leak on cleanup (Eric Blake)
- qemu: avoid memory leak on vcpupin (Eric Blake)
- remote: avoid leak on failure (Eric Blake)
- lock: avoid leak on failure (Eric Blake)
- storage: avoid memory leak on stat failure (Eric Blake)
- storage: avoid memory leak (Eric Blake)
- libvirtd: avoid leak on failure (Eric Blake)
- command: avoid leak on failure (Eric Blake)
- Explicitly set VM state to paused after migration completes (Daniel P. 
Berrange)
- Fix regressions BlockStats/Info APIs in QEMU driver (Daniel P. Berrange)
- Fix minor issues in libxenlight managed save (Jim Fehlig)
- Fix auditing of disk hotunplug operations (Daniel P. Berrange)
- Avoid crash on NULL pointer in lock driver impls during hotplug (Daniel P. 
Berrange)
- Fix return value in lock manager hotplug methods (Daniel P. Berrange)
- Make sure virDomainSave/virDomainManagedSave reset id to -1 (Daniel P. 
Berrange)
- Fix handling of VIR_EVENT_HANDLE_ERROR in QEMU monitor (Daniel P. Berrange)
- security: plug regression introduced in disk probe logic (Eric Blake)
- Fix order of disks and controllers (Jiri Denemark)
- util: Fix incorrect error in PCI functions (Osier Yang)
- openvz: Restore original EOF handling in openvzGetProcessInfo (Matthias Bolte)
- openvz: Handle getline failures in ope

[libvirt] Operation forbidden for read only access

2011-06-05 Thread PREETHI RAMESH
I'm using libvirt's Java API bindingsa and i've opened a connection :
Connect conn=null;
Connect conn1=null;
Connect conn2=null;
Domain testDomain1 = null;

//connect to host vm
try{
conn = new Connect("qemu:///system", true);
System.out.println("exception ONE:");
} catch (LibvirtException e){
System.out.println("exception ONE caught:"+e);
System.out.println(e.getError());
}
 //get the domain in host vm
try {
testDomain1 = conn.domainLookupByName("hda1");
System.out.println("exception TWO:");
} catch (LibvirtException ex) {
System.out.println("exception TWO CAUGHT");
//Logger.getLogger(Migrate.class.getName()).log(Level.SEVERE,
null, ex);
}

//check if domain is running
try{

System.out.println("Domain:" + testDomain1.getName() + " id " +
   testDomain1.getID() + " running " +
   testDomain1.getOSType());
System.out.println("exception THREE:");
} catch (LibvirtException e1){
System.out.println("exception THREE caught: "+e1);
System.out.println(e1.getError());
}
/*try{
 conn1 = new Connect("qemu+ssh://root@10.129.54.254/system",
true);
 //conn2 = new Connect("qemu+ssh://root@10.129.54.254/system",
true);
 Domain migrate1;
 System.out.println("done with ssh");
 String uri="tcp://root@10.129.54.254:49166";
 migrate1 = testDomain1.migrate(conn1,1,null,"tcp://
root@10.129.54.254",0);
 //int ret=testDomain1.migrateToURI("tcp://
root@10.129.54.254:49155",1,null,0);
 System.out.println("exception FOUR:");
 }catch (LibvirtException e2){
System.out.println("exception FOUR caught:"+e2);
System.out.println(e2.getError());

}*/
try{
testDomain1.destroy();
System.out.println("Destroyed"+testDomain1);

}
catch(LibvirtException e4){
System.out.println("exception FOUR caught: "+e4);
System.out.println(e4.getError());
}
The output I'm getting is:
exception ONE:
exception TWO:
Domain:test id 1 running linux
exception THREE:
libvir: Domain error : operation virDomainDestroy forbidden for read only
access
exception FOUR caught: org.libvirt.LibvirtException: operation
virDomainDestroy forbidden for read only access
level:VIR_ERR_ERROR
code:VIR_ERR_OPERATION_DENIED
domain:VIR_FROM_DOM
hasConn:false
hasDom:false
hasNet:false
message:operation virDomainDestroy forbidden for read only access
str1:operation %s forbidden for read only access
str2:virDomainDestroy
str3:null
int1:-1
int2:-1

BUILD SUCCESSFUL (total time: 23 minutes 38 seconds)

I've used qemu:///system but why is my operation being denied?

Thanks!
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] esx: Fix driver method version annotations

2011-06-05 Thread Daniel Veillard
On Mon, Jun 06, 2011 at 08:19:57AM +0800, Daniel Veillard wrote:
> On Sun, Jun 05, 2011 at 10:09:10AM +0200, Matthias Bolte wrote:
> > ---
> >  src/esx/esx_interface_driver.c |6 +++---
> >  src/esx/esx_network_driver.c   |6 +++---
> >  src/esx/esx_nwfilter_driver.c  |6 +++---
> >  src/esx/esx_secret_driver.c|6 +++---
> >  src/esx/esx_storage_driver.c   |2 +-
> >  5 files changed, 13 insertions(+), 13 deletions(-)
[...]
> 
>   ACK,

  also pushed for upcoming release,

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] Fix QEMU p2p v2 migration when run from a v3 client

2011-06-05 Thread Daniel Veillard
On Mon, Jun 06, 2011 at 08:19:00AM +0800, Daniel Veillard wrote:
> On Sat, Jun 04, 2011 at 07:04:19AM -0400, Daniel P. Berrange wrote:
> > When peer-2-peer migration was invoked by a client supporting
> > v3, but where the target server only supported v2, we'd not
> > correctly shutdown the guest.
> > 
> > * src/qemu/qemu_migration.c: Ensure guest is shutdown in
> >   v2 peer 2 peer migration
> > ---
> >  src/qemu/qemu_migration.c |   17 +++--
> >  1 files changed, 11 insertions(+), 6 deletions(-)
> > 
> > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> > index fa506e2..f7eaa1c 100644
> > --- a/src/qemu/qemu_migration.c
> > +++ b/src/qemu/qemu_migration.c
> > @@ -2199,12 +2199,12 @@ static int doPeer2PeerMigrate(struct qemud_driver 
> > *driver,
> 
>   ACK,

  Pushed for the release,

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] qemu: Parse current balloon value returned by query_balloon.

2011-06-05 Thread Osier Yang

On 06/03/2011 10:22 PM, Eric Blake wrote:

On 06/03/2011 02:24 AM, Osier Yang wrote:

Qemu once supported following memory stats which will returned by
"query_balloon":

 stat_put(dict, "actual", actual);
 stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]);
 stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]);
 stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]);
 stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]);
 stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]);
 stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]);




  include/libvirt/libvirt.h.in |4 +++-
  src/libvirt.c|2 ++
  src/qemu/qemu_monitor_json.c |   12 
  tools/virsh.c|2 ++
  4 files changed, 19 insertions(+), 1 deletions(-)


In addition to Matthias' review, does qemu_monitor_text.c also need to
support this?  I think we need a v2.



Yes, will update, thanks for the reviewing.

Regards
Osier

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] docs: Make hvsupport.pl pick up the host device drivers

2011-06-05 Thread Daniel Veillard
On Sun, Jun 05, 2011 at 10:10:08AM +0200, Matthias Bolte wrote:
> Annotate the ESX device driver dummy.
> 
> Refactor the udev and hal device driver strcuts to match the
> common annotation pattern.
> ---
> 
> This is post-0.9.2.

  ACK, it's just a bit sad to make function non-static to improve
the documentation, but okay.

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] Fix QEMU p2p v2 migration when run from a v3 client

2011-06-05 Thread Daniel Veillard
On Sat, Jun 04, 2011 at 07:04:19AM -0400, Daniel P. Berrange wrote:
> When peer-2-peer migration was invoked by a client supporting
> v3, but where the target server only supported v2, we'd not
> correctly shutdown the guest.
> 
> * src/qemu/qemu_migration.c: Ensure guest is shutdown in
>   v2 peer 2 peer migration
> ---
>  src/qemu/qemu_migration.c |   17 +++--
>  1 files changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index fa506e2..f7eaa1c 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -2199,12 +2199,12 @@ static int doPeer2PeerMigrate(struct qemud_driver 
> *driver,

  ACK,

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] esx: Fix driver method version annotations

2011-06-05 Thread Daniel Veillard
On Sun, Jun 05, 2011 at 10:09:10AM +0200, Matthias Bolte wrote:
> ---
>  src/esx/esx_interface_driver.c |6 +++---
>  src/esx/esx_network_driver.c   |6 +++---
>  src/esx/esx_nwfilter_driver.c  |6 +++---
>  src/esx/esx_secret_driver.c|6 +++---
>  src/esx/esx_storage_driver.c   |2 +-
>  5 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/src/esx/esx_interface_driver.c b/src/esx/esx_interface_driver.c
> index 3f9c175..a468976 100644
> --- a/src/esx/esx_interface_driver.c
> +++ b/src/esx/esx_interface_driver.c
> @@ -66,9 +66,9 @@ esxInterfaceClose(virConnectPtr conn)
>  
>  
>  static virInterfaceDriver esxInterfaceDriver = {
> -"ESX", /* name */
> -.open = esxInterfaceOpen, /* 0.7.0 */
> -.close = esxInterfaceClose, /* 0.7.0 */
> +.name = "ESX",
> +.open = esxInterfaceOpen, /* 0.7.6 */
> +.close = esxInterfaceClose, /* 0.7.6 */
>  };
>  
>  
> diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c
> index 9385a26..3c76fae 100644
> --- a/src/esx/esx_network_driver.c
> +++ b/src/esx/esx_network_driver.c
> @@ -66,9 +66,9 @@ esxNetworkClose(virConnectPtr conn)
>  
>  
>  static virNetworkDriver esxNetworkDriver = {
> -"ESX", /* name */
> -.open = esxNetworkOpen, /* 0.7.0 */
> -.close = esxNetworkClose, /* 0.7.0 */
> +.name = "ESX",
> +.open = esxNetworkOpen, /* 0.7.6 */
> +.close = esxNetworkClose, /* 0.7.6 */
>  };
>  
>  
> diff --git a/src/esx/esx_nwfilter_driver.c b/src/esx/esx_nwfilter_driver.c
> index ee85abc..13cacd4 100644
> --- a/src/esx/esx_nwfilter_driver.c
> +++ b/src/esx/esx_nwfilter_driver.c
> @@ -65,9 +65,9 @@ esxNWFilterClose(virConnectPtr conn)
>  
>  
>  static virNWFilterDriver esxNWFilterDriver = {
> -"ESX", /* name */
> -.open = esxNWFilterOpen, /* 0.8.0 */
> -.close = esxNWFilterClose, /* 0.8.0 */
> +.name = "ESX",
> +.open = esxNWFilterOpen, /* 0.8.1 */
> +.close = esxNWFilterClose, /* 0.8.1 */
>  };
>  
>  
> diff --git a/src/esx/esx_secret_driver.c b/src/esx/esx_secret_driver.c
> index dff2290..656224e 100644
> --- a/src/esx/esx_secret_driver.c
> +++ b/src/esx/esx_secret_driver.c
> @@ -64,9 +64,9 @@ esxSecretClose(virConnectPtr conn)
>  
>  
>  static virSecretDriver esxSecretDriver = {
> -"ESX", /* name */
> -.open = esxSecretOpen, /* 0.7.1 */
> -.close = esxSecretClose, /* 0.7.1 */
> +.name = "ESX",
> +.open = esxSecretOpen, /* 0.7.6 */
> +.close = esxSecretClose, /* 0.7.6 */
>  };
>  
>  
> diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c
> index 5ee0cf4..6461917 100644
> --- a/src/esx/esx_storage_driver.c
> +++ b/src/esx/esx_storage_driver.c
> @@ -1645,7 +1645,7 @@ esxStoragePoolIsPersistent(virStoragePoolPtr pool 
> ATTRIBUTE_UNUSED)
>  
>  
>  static virStorageDriver esxStorageDriver = {
> -"ESX", /* name */
> +.name = "ESX",
>  .open = esxStorageOpen, /* 0.7.6 */
>  .close = esxStorageClose, /* 0.7.6 */
>  .numOfPools = esxNumberOfStoragePools, /* 0.8.2 */

  ACK,

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Building on Solaris 11 Express

2011-06-05 Thread Ruben Kerkhof
On Sun, Jun 5, 2011 at 05:17, Richard Laager  wrote:
> On Sat, 2011-06-04 at 21:57 -0500, Richard Laager wrote:
>> From there, virsh connects. It seems to intermittently have problems;
>> I'm trying to reproduce that issue before I can go much further.
>
> As the user xvm:
> This works:   /usr/local/bin/virsh -c vbox:///session list
> This doesn't: /usr/local/bin/virsh -c vbox+ssh://localhost/session list
>
> The latter does create an SSH connection, as it asks me for my password.
> Also, before I had netcat installed, I got an error about nc not
> existing.
>
> Any ideas?

What happens if you run libvirtd as root, and virsh list as yourself?

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] docs: Make hvsupport.pl pick up the host device drivers

2011-06-05 Thread Matthias Bolte
Annotate the ESX device driver dummy.

Refactor the udev and hal device driver strcuts to match the
common annotation pattern.
---

This is post-0.9.2.

 docs/hvsupport.pl|   22 +
 src/esx/esx_device_monitor.c |   15 ++-
 src/node_device/node_device_driver.c |   45 +-
 src/node_device/node_device_driver.h |   14 +-
 src/node_device/node_device_hal.c|   22 +++-
 src/node_device/node_device_udev.c   |   22 +++-
 6 files changed, 79 insertions(+), 61 deletions(-)

diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl
index 8a0fa7a..b0d1f0f 100755
--- a/docs/hvsupport.pl
+++ b/docs/hvsupport.pl
@@ -27,7 +27,7 @@ my %groupheaders = (
 my @srcs;
 find({
 wanted => sub {
-   if (m!$srcdir/.*/\w+_(driver|tmpl)\.c$!) {
+   if (m!$srcdir/.*/\w+_(driver|tmpl|monitor|hal|udev)\.c$!) {
push @srcs, $_ if $_ !~ /vbox_driver\.c/;
}
 }, no_chdir => 1}, $srcdir);
@@ -142,7 +142,7 @@ open FILE, "<$drivertable"
 my %groups;
 my $ingrp;
 while (defined($line = )) {
-if ($line =~ /struct _(vir\w*Driver)/) {
+if ($line =~ /struct _(vir\w*(?:Driver|Monitor))/) {
my $grp = $1;
if ($grp ne "virStateDriver" &&
$grp ne "virStreamDriver") {
@@ -150,7 +150,7 @@ while (defined($line = )) {
$groups{$ingrp} = { apis => {}, drivers => {} };
}
 } elsif ($ingrp) {
-   if ($line =~ /^\s*virDrv(\w+)\s+(\w+);\s*$/) {
+   if ($line =~ /^\s*vir(?:Drv|DevMon)(\w+)\s+(\w+);\s*$/) {
my $field = $2;
my $name = $1;
 
@@ -159,6 +159,8 @@ while (defined($line = )) {
$api = "vir$name";
} elsif (exists $apis{"virConnect$name"}) {
$api = "virConnect$name";
+   } elsif (exists $apis{"virNode$name"}) {
+   $api = "virNode$name";
} else {
die "driver $name does not have a public API";
}
@@ -188,7 +190,17 @@ foreach my $src (@srcs) {
$line =~ /^\s*(?:static\s+)?$grp\s+NAME\(\w+\)\s*=\s*{/) {
$ingrp = $grp;
$impl = $src;
-   $impl =~ s,.*/(\w+?)_((\w+)_)?(\w+)\.c,$1,;
+
+   if ($impl =~ m,.*/node_device_(\w+)\.c,) {
+   $impl = $1;
+   } else {
+   $impl =~ s,.*/(\w+?)_((\w+)_)?(\w+)\.c,$1,;
+   }
+
+   if ($groups{$ingrp}->{drivers}->{$impl}) {
+   die "Group $ingrp already contains $impl";
+   }
+
$groups{$ingrp}->{drivers}->{$impl} = {};
}
}
@@ -206,7 +218,7 @@ foreach my $src (@srcs) {
die "Driver method for $api is NULL in $src" if $meth eq "NULL";
 
if (!exists($groups{$ingrp}->{apis}->{$api})) {
-   die "Found unexpected driver $api in $ingrp\n";
+   die "Found unexpected method $api in $ingrp\n";
}
 
$groups{$ingrp}->{drivers}->{$impl}->{$api} = $vers;
diff --git a/src/esx/esx_device_monitor.c b/src/esx/esx_device_monitor.c
index 3fa63d5..4bc8e7f 100644
--- a/src/esx/esx_device_monitor.c
+++ b/src/esx/esx_device_monitor.c
@@ -66,18 +66,9 @@ esxDeviceClose(virConnectPtr conn)
 
 
 static virDeviceMonitor esxDeviceMonitor = {
-"ESX", /* name */
-esxDeviceOpen, /* open */
-esxDeviceClose,/* close */
-NULL,  /* numOfDevices */
-NULL,  /* listDevices */
-NULL,  /* deviceLookupByName */
-NULL,  /* deviceGetXMLDesc */
-NULL,  /* deviceGetParent */
-NULL,  /* deviceNumOfCaps */
-NULL,  /* deviceListCaps */
-NULL,  /* deviceCreateXML */
-NULL,  /* deviceDestroy */
+.name = "ESX",
+.open = esxDeviceOpen, /* 0.7.6 */
+.close = esxDeviceClose, /* 0.7.6 */
 };
 
 
diff --git a/src/node_device/node_device_driver.c 
b/src/node_device/node_device_driver.c
index 8ec3e44..842f903 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -122,9 +122,10 @@ void nodeDeviceUnlock(virDeviceMonitorStatePtr driver)
 virMutexUnlock(&driver->lock);
 }
 
-static int nodeNumOfDevices(virConnectPtr conn,
-const char *cap,
-unsigned int flags ATTRIBUTE_UNUSED)
+int
+nodeNumOfDevices(virConnectPtr conn,
+ const char *cap,
+ unsigned int flags ATTRIBUTE_UNUSED)
 {
 virDeviceMonitorStatePtr driver = conn->devMonPrivateData;
 int ndevs =

[libvirt] [PATCH] esx: Fix driver method version annotations

2011-06-05 Thread Matthias Bolte
---
 src/esx/esx_interface_driver.c |6 +++---
 src/esx/esx_network_driver.c   |6 +++---
 src/esx/esx_nwfilter_driver.c  |6 +++---
 src/esx/esx_secret_driver.c|6 +++---
 src/esx/esx_storage_driver.c   |2 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/esx/esx_interface_driver.c b/src/esx/esx_interface_driver.c
index 3f9c175..a468976 100644
--- a/src/esx/esx_interface_driver.c
+++ b/src/esx/esx_interface_driver.c
@@ -66,9 +66,9 @@ esxInterfaceClose(virConnectPtr conn)
 
 
 static virInterfaceDriver esxInterfaceDriver = {
-"ESX", /* name */
-.open = esxInterfaceOpen, /* 0.7.0 */
-.close = esxInterfaceClose, /* 0.7.0 */
+.name = "ESX",
+.open = esxInterfaceOpen, /* 0.7.6 */
+.close = esxInterfaceClose, /* 0.7.6 */
 };
 
 
diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c
index 9385a26..3c76fae 100644
--- a/src/esx/esx_network_driver.c
+++ b/src/esx/esx_network_driver.c
@@ -66,9 +66,9 @@ esxNetworkClose(virConnectPtr conn)
 
 
 static virNetworkDriver esxNetworkDriver = {
-"ESX", /* name */
-.open = esxNetworkOpen, /* 0.7.0 */
-.close = esxNetworkClose, /* 0.7.0 */
+.name = "ESX",
+.open = esxNetworkOpen, /* 0.7.6 */
+.close = esxNetworkClose, /* 0.7.6 */
 };
 
 
diff --git a/src/esx/esx_nwfilter_driver.c b/src/esx/esx_nwfilter_driver.c
index ee85abc..13cacd4 100644
--- a/src/esx/esx_nwfilter_driver.c
+++ b/src/esx/esx_nwfilter_driver.c
@@ -65,9 +65,9 @@ esxNWFilterClose(virConnectPtr conn)
 
 
 static virNWFilterDriver esxNWFilterDriver = {
-"ESX", /* name */
-.open = esxNWFilterOpen, /* 0.8.0 */
-.close = esxNWFilterClose, /* 0.8.0 */
+.name = "ESX",
+.open = esxNWFilterOpen, /* 0.8.1 */
+.close = esxNWFilterClose, /* 0.8.1 */
 };
 
 
diff --git a/src/esx/esx_secret_driver.c b/src/esx/esx_secret_driver.c
index dff2290..656224e 100644
--- a/src/esx/esx_secret_driver.c
+++ b/src/esx/esx_secret_driver.c
@@ -64,9 +64,9 @@ esxSecretClose(virConnectPtr conn)
 
 
 static virSecretDriver esxSecretDriver = {
-"ESX", /* name */
-.open = esxSecretOpen, /* 0.7.1 */
-.close = esxSecretClose, /* 0.7.1 */
+.name = "ESX",
+.open = esxSecretOpen, /* 0.7.6 */
+.close = esxSecretClose, /* 0.7.6 */
 };
 
 
diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c
index 5ee0cf4..6461917 100644
--- a/src/esx/esx_storage_driver.c
+++ b/src/esx/esx_storage_driver.c
@@ -1645,7 +1645,7 @@ esxStoragePoolIsPersistent(virStoragePoolPtr pool 
ATTRIBUTE_UNUSED)
 
 
 static virStorageDriver esxStorageDriver = {
-"ESX", /* name */
+.name = "ESX",
 .open = esxStorageOpen, /* 0.7.6 */
 .close = esxStorageClose, /* 0.7.6 */
 .numOfPools = esxNumberOfStoragePools, /* 0.8.2 */
-- 
1.7.0.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list