At Sat, 5 Jan 2013 12:48:18 +0100,
Wido den Hollander wrote:
Signed-off-by: Wido den Hollander <wido(a)widodh.nl>
---
src/main/java/org/libvirt/jna/Libvirt.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main/java/org/libvirt/jna/Libvirt.java
b/src/main/java/org/libvirt/jna/Libvirt.java
index e68d9ed..dbd8f6c 100644
--- a/src/main/java/org/libvirt/jna/Libvirt.java
+++ b/src/main/java/org/libvirt/jna/Libvirt.java
@@ -168,6 +168,7 @@ public interface Libvirt extends Library {
public int virDomainAttachDevice(DomainPointer virDomainPtr, String deviceXML);
public int virDomainAttachDeviceFlags(DomainPointer virDomainPtr, String deviceXML,
int flags);
public int virDomainBlockStats(DomainPointer virDomainPtr, String path,
virDomainBlockStats stats, int size);
+ public int virDomainBlockResize(DomainPointer virDomainPtr, String disk, NativeLong
size, int flags);
public int virDomainCoreDump(DomainPointer virDomainPtr, String to, int flags);
public int virDomainCreate(DomainPointer virDomainPtr);
public int virDomainCreateWithFlags(DomainPointer virDomainPtr, int flags);
@@ -313,6 +314,7 @@ public interface Libvirt extends Library {
public StorageVolPointer virStorageVolLookupByName(StoragePoolPointer
storagePoolPtr, String name);
public StorageVolPointer virStorageVolLookupByPath(ConnectionPointer virConnectPtr,
String path);
public int virStorageVolWipe(StorageVolPointer storageVolPtr, int flags);
+ public int virStorageVolResize(StorageVolPointer storageVolPtr, NativeLong capacity,
int flags);
// Interface Methods
public int virInterfaceCreate(InterfacePointer virDevicePointer);
NACK since the wrapping is wrong.
The native type of the capacity parameter is "unsigned long long".
When wrapping this type using JNA one should just use the Java "long" type.
See
https://github.com/twall/jna/blob/master/www/Mappings.md
Btw, using the "public" modifier in interfaces is discouraged in Java
(see JLS 9.4). I'll push a patch shortly removing those modifiers. So,
please refrain from using those in new code.
Claudio
--
AV-Test GmbH, Henricistraße 20, 04155 Leipzig, Germany
Phone: +49 341 265 310 19
Web:<http://www.av-test.org>
Eingetragen am / Registered at: Amtsgericht Stendal (HRB 114076)
Geschaeftsfuehrer (CEO): Andreas Marx, Guido Habicht, Maik Morgenstern