[libvirt] [PATCH v1 0/2] Add missing protocol filters for IPv4 and add IPv6 support
by Stefan Berger
The first one of the following two patches adds support for filtering
of ah, esp and udplite protocols. The 2nd one adds support for filtering
of IPv6 traffic. With this now nearly all protocols of IPv4 and IPv6
(except mh) as supported by iptables/ip6tables are reachable via the
filtering XML. Some features of those protocols still need support
in data structures and XML attributes, though.
Another thing that's missing is support for filtering of IPv6's NDP traffic
(IPv6 equivalent of ARP) but there's no support for this in ebtables.
Regards,
Stefan
14 years, 11 months
[libvirt] [PATCH] Fix error in nwfilter test driver
by Stefan Berger
Trivial fix for the c&p error in the nwfilter test driver.
Signed-off-by: Stefan Berger <stefanb(a)us.ibm.com>
Index: libvirt-acl/src/test/test_driver.c
===================================================================
--- libvirt-acl.orig/src/test/test_driver.c
+++ libvirt-acl/src/test/test_driver.c
@@ -5212,7 +5212,7 @@ static virDrvOpenStatus testNWFilterOpen
if (STRNEQ(conn->driver->name, "Test"))
return VIR_DRV_OPEN_DECLINED;
- conn->secretPrivateData = conn->privateData;
+ conn->nwfilterPrivateData = conn->privateData;
return VIR_DRV_OPEN_SUCCESS;
}
14 years, 11 months
[libvirt] [RESEND][PATCH][QEMU driver] Catch cdrom change error
by Ryan Harper
Currently when we attempt to change the cdrom in a qemu VM the monitor
doesn't generate an error if the target filename doesn't exist. I've
submitted a patch[1] for this. This patch is the libvirt qemu-driver
side which catches the error message from the monitor and reportes the
error to libvirt. This means that virsh attach-disk cdrom commands
won't appear to succeed when qemu change command actually failed.
I've tested this patch on an older libvirt (rebuild libvirt-0.7.0 on my
ubuntu host) but haven't rebuilt against git head since I can't
quite compile that on my host.
1. http://lists.gnu.org/archive/html/qemu-devel/2010-03/msg01935.html
Signed-off-by: Ryan Harper <ryanh(a)us.ibm.com>
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 1596e59..f868907 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -905,7 +905,14 @@ int qemuMonitorTextChangeMedia(qemuMonitorPtr mon,
qemuReportError(VIR_ERR_OPERATION_FAILED,
_("could not eject media on %s: %s"), devname, reply);
goto cleanup;
- }
+ }
+
+ /* Could not open message indicates bad filename */
+ if (strstr(reply, "\nCould not open ")) {
+ qemuReportError(VIR_ERR_OPERATION_FAILED,
+ _("could not change media on %s: %s"), devname, reply);
+ goto cleanup;
+ }
ret = 0;
--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh(a)us.ibm.com
14 years, 11 months
[libvirt] [PATCH 0/15] Various MinGW/Windows fixes
by Matthias Bolte
This series fixes several MinGW compile problem on Windows.
Most patches are about exported symbols or missing function bodies.
There is also a gnulib issue with MinGW on Windows pending.
Eric and I are working on a patch for it.
Patches:
01/15 gnulib: Add usleep for MinGW builds
02/15 Make sure uid_t and gid_t are available
03/15 Export conditional state driver symbols only when they are defined
04/15 Remove interfaceRegister from libvirt_private.syms
05/15 Fix export of virConnectAuthPtrDefault for MinGW builds
06/15 Generate libvirt.def from libvirt.syms
07/15 virsh: Handle absence of SA_SIGINFO
08/15 Make sure virtTestCaptureProgramOutput has a body on Windows
09/15 util: Make some conditional symbols unconditional
10/15 bootstrap: Remove rsync from buildreq list
11/15 util: Handle lack of (f)chmod and (f)chown on Windows
12/15 bootstrap: Enable copy-mode for MinGW builds
13/15 util: Replace pciWaitForDeviceCleanup with a stub on Windows
14/15 Add HAVE_PTHREAD_H guard for pthread_sigmask
15/15 util: Add stubs for some functions on Windows
Overall diffstat:
bootstrap.conf | 8 ++-
configure.ac | 17 +++++
docs/apibuild.py | 1 +
include/libvirt/libvirt.h.in | 16 +++++-
src/.gitignore | 1 +
src/Makefile.am | 26 ++++++--
src/libvirt_daemon.syms | 10 +++
src/libvirt_private.syms | 9 ---
src/remote/remote_driver.c | 6 ++
src/util/pci.c | 14 ++++
src/util/util.c | 135 ++++++++++++++++++++++++++++++++++++------
src/util/util.h | 4 -
tests/testutils.c | 6 ++
tools/virsh.c | 4 +
14 files changed, 218 insertions(+), 39 deletions(-)
Matthias
14 years, 12 months
[libvirt] [PATCH] Avoid searching for windres when not building for cygwin or mingw.
by Diego Elio Pettenò
Just checking for a windres tool might hit even on Linux systems when
building for Linux (e.g.: when using Gentoo and having built binutils with
multitarget support), and will then fail to link properly at the end of the
build.
Check the host string before deciding whether to look for windres or not.
---
configure.ac | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 29c6396..e6122b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1676,8 +1676,13 @@ AC_SUBST([CYGWIN_EXTRA_PYTHON_LIBADD])
AC_SUBST([MINGW_EXTRA_LDFLAGS])
dnl Look for windres to build a Windows icon resource.
-AC_CHECK_TOOL([WINDRES], [windres], [no])
-AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != "no"])
+case "$host" in
+ *cygwin* | *mingw* )
+ AC_CHECK_TOOL([WINDRES], [windres], [])
+ ;;
+esac
+
+AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != ""])
--
1.6.6.1
14 years, 12 months
[libvirt] [PATCH] domain_event.c: don't deref NULL on an OOM error path
by Jim Meyering
This fixes a pair of potential segfault-inducing bugs:
>From 7ca7e9cd366b17e41da9207b68de7e9166a88da2 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Mon, 29 Mar 2010 17:43:01 +0200
Subject: [PATCH] domain_event.c: don't deref NULL on an OOM error path
* src/conf/domain_event.c (virDomainEventGraphicsNewFromDom):
Return NULL when handling out-of-memory error, rather than
falling through with ev=NULL and then assigning to ev->member.
(virDomainEventGraphicsNewFromObj): Likewise.
---
src/conf/domain_event.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index 41c70fc..1cf03e3 100644
--- a/src/conf/domain_event.c
+++ b/src/conf/domain_event.c
@@ -681,19 +681,19 @@ virDomainEventPtr virDomainEventGraphicsNewFromDom(virDomainPtr dom,
{
virDomainEventPtr ev =
virDomainEventNewInternal(VIR_DOMAIN_EVENT_ID_GRAPHICS,
dom->id, dom->name, dom->uuid);
if (ev) {
ev->data.graphics.phase = phase;
if (!(ev->data.graphics.authScheme = strdup(authScheme))) {
virDomainEventFree(ev);
- ev = NULL;
+ return NULL;
}
ev->data.graphics.local = local;
ev->data.graphics.remote = remote;
ev->data.graphics.subject = subject;
}
return ev;
}
@@ -706,19 +706,19 @@ virDomainEventPtr virDomainEventGraphicsNewFromObj(virDomainObjPtr obj,
{
virDomainEventPtr ev =
virDomainEventNewInternal(VIR_DOMAIN_EVENT_ID_GRAPHICS,
obj->def->id, obj->def->name, obj->def->uuid);
if (ev) {
ev->data.graphics.phase = phase;
if (!(ev->data.graphics.authScheme = strdup(authScheme))) {
virDomainEventFree(ev);
- ev = NULL;
+ return NULL;
}
ev->data.graphics.local = local;
ev->data.graphics.remote = remote;
ev->data.graphics.subject = subject;
}
return ev;
}
--
1.7.0.3.448.g82eeb
14 years, 12 months
[libvirt] [TCK PATCH] maint: use correct Red Hat copyright
by Eric Blake
* scripts/domain/050-transient-lifecycle.t: Correct the copyright
line.
* scripts/domain/051-transient-autostart.t: Likewise.
* scripts/domain/060-persistent-lifecycle.t: Likewise.
* scripts/domain/061-persistent-autostart.t: Likewise.
* scripts/domain/065-persistent-redefine.t: Likewise.
* scripts/domain/070-transient-to-persistent.t: Likewise.
* scripts/domain/080-unique-id-define.t: Likewise.
* scripts/domain/081-unique-id-create.t: Likewise.
* scripts/domain/090-invalid-ops-when-inactive.t: Likewise.
* scripts/domain/100-transient-save-restore.t: Likewise.
* scripts/domain/101-persistent-save-restore.t: Likewise.
* scripts/domain/102-broken-save-restore.t: Likewise.
* scripts/domain/120-disks-stats.t: Likewise.
* scripts/domain/200-disk-hotplug.t: Likewise.
* scripts/domain/205-disk-hotplug-ordering.t: Likewise.
* scripts/domain/210-nic-hotplug.t: Likewise.
* scripts/domain/215-nic-hotplug-many.t: Likewise.
* scripts/domain/240-usb-host-hotplug.t: Likewise.
* scripts/domain/250-pci-host-hotplug.t: Likewise.
* scripts/qemu/100-disk-encryption.t: Likewise.
* scripts/storage/100-create-vol-dir.t: Likewise.
* scripts/storage/200-clone-vol-dir.t: Likewise.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
This probably counts as trivial, but since this is my first
libvirt-tck patch, I thought I'd ask first.
scripts/domain/050-transient-lifecycle.t | 2 +-
scripts/domain/051-transient-autostart.t | 2 +-
scripts/domain/060-persistent-lifecycle.t | 2 +-
scripts/domain/061-persistent-autostart.t | 2 +-
scripts/domain/065-persistent-redefine.t | 2 +-
scripts/domain/070-transient-to-persistent.t | 2 +-
scripts/domain/080-unique-id-define.t | 2 +-
scripts/domain/081-unique-id-create.t | 2 +-
scripts/domain/090-invalid-ops-when-inactive.t | 2 +-
scripts/domain/100-transient-save-restore.t | 2 +-
scripts/domain/101-persistent-save-restore.t | 2 +-
scripts/domain/102-broken-save-restore.t | 2 +-
scripts/domain/120-disks-stats.t | 2 +-
scripts/domain/200-disk-hotplug.t | 2 +-
scripts/domain/205-disk-hotplug-ordering.t | 2 +-
scripts/domain/210-nic-hotplug.t | 2 +-
scripts/domain/215-nic-hotplug-many.t | 2 +-
scripts/domain/240-usb-host-hotplug.t | 2 +-
scripts/domain/250-pci-host-hotplug.t | 2 +-
scripts/qemu/100-disk-encryption.t | 2 +-
scripts/storage/100-create-vol-dir.t | 2 +-
scripts/storage/200-clone-vol-dir.t | 2 +-
22 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/scripts/domain/050-transient-lifecycle.t b/scripts/domain/050-transient-lifecycle.t
index 22e5c70..89c9d1a 100644
--- a/scripts/domain/050-transient-lifecycle.t
+++ b/scripts/domain/050-transient-lifecycle.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/051-transient-autostart.t b/scripts/domain/051-transient-autostart.t
index 9114a28..d43caa1 100644
--- a/scripts/domain/051-transient-autostart.t
+++ b/scripts/domain/051-transient-autostart.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/060-persistent-lifecycle.t b/scripts/domain/060-persistent-lifecycle.t
index 55bdc6c..ddffa02 100644
--- a/scripts/domain/060-persistent-lifecycle.t
+++ b/scripts/domain/060-persistent-lifecycle.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/061-persistent-autostart.t b/scripts/domain/061-persistent-autostart.t
index c39ec72..5200454 100644
--- a/scripts/domain/061-persistent-autostart.t
+++ b/scripts/domain/061-persistent-autostart.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/065-persistent-redefine.t b/scripts/domain/065-persistent-redefine.t
index 712803c..c19b292 100644
--- a/scripts/domain/065-persistent-redefine.t
+++ b/scripts/domain/065-persistent-redefine.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/070-transient-to-persistent.t b/scripts/domain/070-transient-to-persistent.t
index 346b329..7d85ef6 100644
--- a/scripts/domain/070-transient-to-persistent.t
+++ b/scripts/domain/070-transient-to-persistent.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/080-unique-id-define.t b/scripts/domain/080-unique-id-define.t
index 066c2e8..ed4a8fc 100644
--- a/scripts/domain/080-unique-id-define.t
+++ b/scripts/domain/080-unique-id-define.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/081-unique-id-create.t b/scripts/domain/081-unique-id-create.t
index c081674..425116f 100644
--- a/scripts/domain/081-unique-id-create.t
+++ b/scripts/domain/081-unique-id-create.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/090-invalid-ops-when-inactive.t b/scripts/domain/090-invalid-ops-when-inactive.t
index 28f4936..86f332b 100644
--- a/scripts/domain/090-invalid-ops-when-inactive.t
+++ b/scripts/domain/090-invalid-ops-when-inactive.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/100-transient-save-restore.t b/scripts/domain/100-transient-save-restore.t
index 314493c..bab42da 100644
--- a/scripts/domain/100-transient-save-restore.t
+++ b/scripts/domain/100-transient-save-restore.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/101-persistent-save-restore.t b/scripts/domain/101-persistent-save-restore.t
index 251aacd..f1c8d4b 100644
--- a/scripts/domain/101-persistent-save-restore.t
+++ b/scripts/domain/101-persistent-save-restore.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/102-broken-save-restore.t b/scripts/domain/102-broken-save-restore.t
index 2981d64..b93e274 100644
--- a/scripts/domain/102-broken-save-restore.t
+++ b/scripts/domain/102-broken-save-restore.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/120-disks-stats.t b/scripts/domain/120-disks-stats.t
index c8b3420..5cbaf8c 100644
--- a/scripts/domain/120-disks-stats.t
+++ b/scripts/domain/120-disks-stats.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/200-disk-hotplug.t b/scripts/domain/200-disk-hotplug.t
index 1272448..0f10dbf 100644
--- a/scripts/domain/200-disk-hotplug.t
+++ b/scripts/domain/200-disk-hotplug.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/205-disk-hotplug-ordering.t b/scripts/domain/205-disk-hotplug-ordering.t
index f41d45c..a2e3088 100644
--- a/scripts/domain/205-disk-hotplug-ordering.t
+++ b/scripts/domain/205-disk-hotplug-ordering.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/210-nic-hotplug.t b/scripts/domain/210-nic-hotplug.t
index 6451fd2..7521978 100644
--- a/scripts/domain/210-nic-hotplug.t
+++ b/scripts/domain/210-nic-hotplug.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/215-nic-hotplug-many.t b/scripts/domain/215-nic-hotplug-many.t
index 48fdfcf..7465f2c 100644
--- a/scripts/domain/215-nic-hotplug-many.t
+++ b/scripts/domain/215-nic-hotplug-many.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/240-usb-host-hotplug.t b/scripts/domain/240-usb-host-hotplug.t
index ac71e7b..6e74434 100644
--- a/scripts/domain/240-usb-host-hotplug.t
+++ b/scripts/domain/240-usb-host-hotplug.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009-2010 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009-2010 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/domain/250-pci-host-hotplug.t b/scripts/domain/250-pci-host-hotplug.t
index 5bb4fd9..a9fe422 100644
--- a/scripts/domain/250-pci-host-hotplug.t
+++ b/scripts/domain/250-pci-host-hotplug.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009-2010 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009-2010 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/qemu/100-disk-encryption.t b/scripts/qemu/100-disk-encryption.t
index 5964aa5..d594607 100644
--- a/scripts/qemu/100-disk-encryption.t
+++ b/scripts/qemu/100-disk-encryption.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/storage/100-create-vol-dir.t b/scripts/storage/100-create-vol-dir.t
index 2a09036..3a12596 100644
--- a/scripts/storage/100-create-vol-dir.t
+++ b/scripts/storage/100-create-vol-dir.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
diff --git a/scripts/storage/200-clone-vol-dir.t b/scripts/storage/200-clone-vol-dir.t
index dbc17c5..3b4d864 100644
--- a/scripts/storage/200-clone-vol-dir.t
+++ b/scripts/storage/200-clone-vol-dir.t
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# Copyright (C) 2009 Red Hat
+# Copyright (C) 2009-2010 Red Hat, Inc.
# Copyright (C) 2009 Daniel P. Berrange
#
# This program is free software; You can redistribute it and/or modify
--
1.6.6.1
14 years, 12 months
[libvirt] [PATCH Java] Add finalize to automatically free libvirt objects
by Matthias Bolte
The Connect and Network classes already had finalize, add it to all
other classes that wrap libvirt objects to unify the behavior.
---
src/main/java/org/libvirt/Device.java | 5 +++++
src/main/java/org/libvirt/Domain.java | 5 +++++
src/main/java/org/libvirt/Interface.java | 5 +++++
src/main/java/org/libvirt/Network.java | 1 +
src/main/java/org/libvirt/StoragePool.java | 5 +++++
src/main/java/org/libvirt/StorageVol.java | 5 +++++
6 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/src/main/java/org/libvirt/Device.java b/src/main/java/org/libvirt/Device.java
index b4f9a0c..5329be5 100644
--- a/src/main/java/org/libvirt/Device.java
+++ b/src/main/java/org/libvirt/Device.java
@@ -132,6 +132,11 @@ public class Device {
return desc;
}
+ @Override
+ public void finalize() throws LibvirtException {
+ free();
+ }
+
/**
* Frees this device object. The running instance is kept alive. The data
* structure is freed and should not be used thereafter.
diff --git a/src/main/java/org/libvirt/Domain.java b/src/main/java/org/libvirt/Domain.java
index e7b24ef..a80800c 100644
--- a/src/main/java/org/libvirt/Domain.java
+++ b/src/main/java/org/libvirt/Domain.java
@@ -162,6 +162,11 @@ public class Domain {
processError();
}
+ @Override
+ public void finalize() throws LibvirtException {
+ free();
+ }
+
/**
* Frees this domain object. The running instance is kept alive. The data
* structure is freed and should not be used thereafter.
diff --git a/src/main/java/org/libvirt/Interface.java b/src/main/java/org/libvirt/Interface.java
index 44bcad5..8b97925 100644
--- a/src/main/java/org/libvirt/Interface.java
+++ b/src/main/java/org/libvirt/Interface.java
@@ -112,6 +112,11 @@ public class Interface {
return returnValue;
}
+ @Override
+ public void finalize() throws LibvirtException {
+ free();
+ }
+
/**
* Frees this interface object. The running instance is kept alive. The data
* structure is freed and should not be used thereafter.
diff --git a/src/main/java/org/libvirt/Network.java b/src/main/java/org/libvirt/Network.java
index 3c6f313..63b1f12 100644
--- a/src/main/java/org/libvirt/Network.java
+++ b/src/main/java/org/libvirt/Network.java
@@ -64,6 +64,7 @@ public class Network {
processError();
}
+ @Override
public void finalize() throws LibvirtException {
free();
}
diff --git a/src/main/java/org/libvirt/StoragePool.java b/src/main/java/org/libvirt/StoragePool.java
index 7de7d50..54468bd 100644
--- a/src/main/java/org/libvirt/StoragePool.java
+++ b/src/main/java/org/libvirt/StoragePool.java
@@ -115,6 +115,11 @@ public class StoragePool {
processError();
}
+ @Override
+ public void finalize() throws LibvirtException {
+ free();
+ }
+
/**
* Free a storage pool object, releasing all memory associated with it. Does
* not change the state of the pool on the host.
diff --git a/src/main/java/org/libvirt/StorageVol.java b/src/main/java/org/libvirt/StorageVol.java
index 5ae5f5c..c5a3717 100644
--- a/src/main/java/org/libvirt/StorageVol.java
+++ b/src/main/java/org/libvirt/StorageVol.java
@@ -75,6 +75,11 @@ public class StorageVol {
processError();
}
+ @Override
+ public void finalize() throws LibvirtException {
+ free();
+ }
+
/**
* Release the storage volume handle. The underlying storage volume contains
* to exist
--
1.6.3.3
14 years, 12 months
[libvirt] [PATCH] build: import latest gnulib
by Eric Blake
* .gnulib: Update to latest.
* cfg.mk (sc_prohibit_test_minus_ao): Delete, it was moved into
gnulib's maint.mk.
---
Here's the full list of gnulib changes:
* .gnulib 4f01268...e01b458 (44):
> maint.mk: check for [ as well as test
> gnumakefile: don't squelch _version output
> sys_time: avoid compiler warnings
> maint.mk: split a long line
> maint.mk: s/_header_without_use/_sc_header_without_use/
> maint: improve module indicators
> fdopendir: work around FreeBSD bug
> Emit #pragma system_header after the inclusion guard, not before.
> Fix indentation.
> save-cwd: don't leak a file descriptor when the caller execs
> Remove vestiges of fts-lgpl module.
> Fix definition of tests witness macro.
> Fix definition of tests witness macro.
> Fix ioctl's protoype on glibc systems.
> Normalize copyright line formatting.
> exclude: fix the case of globs vs. EXCLUDE_INCLUDE
> maint.mk: prohibit use of test's -o and -a operators
> Remove unused GNULIB_XYZ macro definitions.
> Mark privileged tests modules.
> Split C++ tests into separate tests modules.
> gnulib-tool: Allow 'foo-tests' module even if there is no module 'foo'.
> gnulib-tool: Add support for special categories of tests.
> ansi-c++-opt: Allow turning off the C++ build by default.
> unistd: Avoid #define replacements in C++ mode.
> Fix link errors on mingw.
> lib-ignore: Determine different options for different compilers.
> Remove unused GNULIB_XYZ macro definitions.
> Add a remark about certain modules.
> Resolve conflict between the two kinds of module indicators.
> autoupdate
> Distinguish two kinds of module indicators.
> New module description field 'Comment'.
> Addendum to 2010-02-07 commit.
> Use GNULIB_POSIXCHECK instead of GNULIB_PORTCHECK.
> Avoid side effects from tests-related modules on the compilation of lib.
> Factorize common .m4 code.
> Fix a compilation error on Cygwin with g++ >= 4.3.
> Rename gl_GETLOGIN.
> Rename gl_GETLOGIN_R.
> Rename gl_INET_NTOP.
> Rename gl_INET_PTON.
> Rename gl_MBSLEN.
> Rename gl_FORKPTY and gl_OPENPTY.
> top/maint.mk (sc_texinfo_acronym): Don't infloop if there is no *.texi files.
.gnulib | 2 +-
cfg.mk | 8 --------
2 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/.gnulib b/.gnulib
index 4f01268..e01b458 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 4f01268d0c584c20704e42527f4fa125e7525aae
+Subproject commit e01b458f40440e64ce6f59beb0b446219bb6302d
diff --git a/cfg.mk b/cfg.mk
index 2e7b68a..07360b0 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -272,14 +272,6 @@ sc_preprocessor_indentation:
echo '$(ME): skipping test $@: cppi not installed' 1>&2; \
fi
-_m1 = use "test C1 && test C2", not "test C1 -''a C2"
-_m2 = use "test C1 || test C2", not "test C1 -''o C2"
-# Using test's -a and -o operators is not portable.
-sc_prohibit_test_minus_ao:
- @re='(\<test| \[+) .+ -[ao] ' \
- msg='$(_m1); $(_m2)' \
- $(_prohibit_regexp)
-
sc_copyright_format:
@$(VC_LIST_EXCEPT) | xargs grep -ni 'copyright .*Red 'Hat \
| grep -v Inc \
--
1.6.6.1
15 years