summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/com/redhat/et/libguestfs/GuestFS.java21
-rw-r--r--java/com_redhat_et_libguestfs_GuestFS.c14
2 files changed, 35 insertions, 0 deletions
diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java
index 0d9ae9df..26f1aaa6 100644
--- a/java/com/redhat/et/libguestfs/GuestFS.java
+++ b/java/com/redhat/et/libguestfs/GuestFS.java
@@ -535,6 +535,27 @@ public class GuestFS {
throws LibGuestFSException;
/**
+ * leave the busy state
+ *
+ * This sets the state to "READY", or if in "CONFIG" then
+ * it leaves the state as is. This is only used when
+ * implementing actions using the low-level API.
+ *
+ * For more information on states, see guestfs(3).
+ *
+ * @throws LibGuestFSException
+ */
+ public void end_busy ()
+ throws LibGuestFSException
+ {
+ if (g == 0)
+ throw new LibGuestFSException ("end_busy: handle is closed");
+ _end_busy (g);
+ }
+ private native void _end_busy (long g)
+ throws LibGuestFSException;
+
+ /**
* mount a guest disk at a position in the filesystem
*
* Mount a guest disk at a position in the filesystem.
diff --git a/java/com_redhat_et_libguestfs_GuestFS.c b/java/com_redhat_et_libguestfs_GuestFS.c
index 48cd60ff..2ad4c6ab 100644
--- a/java/com_redhat_et_libguestfs_GuestFS.c
+++ b/java/com_redhat_et_libguestfs_GuestFS.c
@@ -387,6 +387,20 @@ Java_com_redhat_et_libguestfs_GuestFS__1set_1ready
}
JNIEXPORT void JNICALL
+Java_com_redhat_et_libguestfs_GuestFS__1end_1busy
+ (JNIEnv *env, jobject obj, jlong jg)
+{
+ guestfs_h *g = (guestfs_h *) (long) jg;
+ int r;
+
+ r = guestfs_end_busy (g);
+ if (r == -1) {
+ throw_exception (env, guestfs_last_error (g));
+ return ;
+ }
+}
+
+JNIEXPORT void JNICALL
Java_com_redhat_et_libguestfs_GuestFS__1mount
(JNIEnv *env, jobject obj, jlong jg, jstring jdevice, jstring jmountpoint)
{