X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=java%2Fcom%2Fredhat%2Fet%2Flibguestfs%2FGuestFS.java;h=119a2df1d6dc232f68b88c396142405dba411ce7;hp=8c2265e72eebd7b377b515fc92741bdeae6f9b7a;hb=43db06ea892cc157324a6b837ca430607441c509;hpb=54dd7be5855055a698291084c0074a1abac7b921 diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java index 8c2265e..119a2df 100644 --- a/java/com/redhat/et/libguestfs/GuestFS.java +++ b/java/com/redhat/et/libguestfs/GuestFS.java @@ -219,6 +219,56 @@ public class GuestFS { throws LibGuestFSException; /** + * set the qemu binary + * + * Set the qemu binary that we will use. + * + * The default is chosen when the library was compiled by + * the configure script. + * + * You can also override this by setting the + * "LIBGUESTFS_QEMU" environment variable. + * + * The string "qemu" is stashed in the libguestfs handle, + * so the caller must make sure it remains valid for the + * lifetime of the handle. + * + * Setting "qemu" to "NULL" restores the default qemu + * binary. + * + * @throws LibGuestFSException + */ + public void set_qemu (String qemu) + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("set_qemu: handle is closed"); + _set_qemu (g, qemu); + } + private native void _set_qemu (long g, String qemu) + throws LibGuestFSException; + + /** + * get the qemu binary + * + * Return the current qemu binary. + * + * This is always non-NULL. If it wasn't set already, then + * this will return the default qemu binary name. + * + * @throws LibGuestFSException + */ + public String get_qemu () + throws LibGuestFSException + { + if (g == 0) + throw new LibGuestFSException ("get_qemu: handle is closed"); + return _get_qemu (g); + } + private native String _get_qemu (long g) + throws LibGuestFSException; + + /** * set the search path * * Set the path that libguestfs searches for kernel and