This wraps the virDomainIsUpdated libvirt function available since version 0.8.6. Signed-off-by: Claudio Bley <cbley@xxxxxxxxxx> --- src/main/java/org/libvirt/Domain.java | 8 ++++++++ src/main/java/org/libvirt/jna/Libvirt.java | 1 + 2 files changed, 9 insertions(+) diff --git a/src/main/java/org/libvirt/Domain.java b/src/main/java/org/libvirt/Domain.java index 5f0d1d0..fae95fe 100644 --- a/src/main/java/org/libvirt/Domain.java +++ b/src/main/java/org/libvirt/Domain.java @@ -799,6 +799,14 @@ public class Domain { return processError(libvirt.virDomainIsPersistent(VDP)); } + + /** + * Returns {@code true} if, and only if, this domain has been updated. + */ + public boolean isUpdated() throws LibvirtException { + return processError(libvirt.virDomainIsUpdated(this.VDP)) == 1; + } + /** * suspend a domain and save its memory contents to a file on disk. * diff --git a/src/main/java/org/libvirt/jna/Libvirt.java b/src/main/java/org/libvirt/jna/Libvirt.java index 21ee2c2..2c75018 100644 --- a/src/main/java/org/libvirt/jna/Libvirt.java +++ b/src/main/java/org/libvirt/jna/Libvirt.java @@ -276,6 +276,7 @@ public interface Libvirt extends Library { int virDomainInterfaceStats(DomainPointer virDomainPtr, String path, virDomainInterfaceStats stats, SizeT size); int virDomainIsActive(DomainPointer virDomainPtr); int virDomainIsPersistent(DomainPointer virDomainPtr); + int virDomainIsUpdated(DomainPointer virDomainPtr); DomainPointer virDomainLookupByID(ConnectionPointer virConnectPtr, int id); DomainPointer virDomainLookupByName(ConnectionPointer virConnectPtr, String name); DomainPointer virDomainLookupByUUID(ConnectionPointer virConnectPtr, byte[] uuidBytes); -- 1.7.9.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list