summaryrefslogtreecommitdiffstats
path: root/java/com_redhat_et_libguestfs_GuestFS.c
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-30 18:57:07 +0100
committerRichard Jones <rjones@redhat.com>2009-04-30 18:57:07 +0100
commit0703248d233744047515418893dac05ce013a642 (patch)
treeead0b718136e64b179b9d46f3fc314cdd49f2149 /java/com_redhat_et_libguestfs_GuestFS.c
parentc69c3695303d5a660ad093a076c2e364ae6061de (diff)
downloadlibguestfs-0703248d233744047515418893dac05ce013a642.tar.gz
libguestfs-0703248d233744047515418893dac05ce013a642.tar.xz
libguestfs-0703248d233744047515418893dac05ce013a642.zip
Add generated code for 'fsck' command.
Diffstat (limited to 'java/com_redhat_et_libguestfs_GuestFS.c')
-rw-r--r--java/com_redhat_et_libguestfs_GuestFS.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/java/com_redhat_et_libguestfs_GuestFS.c b/java/com_redhat_et_libguestfs_GuestFS.c
index f012a4b8..1f5579e2 100644
--- a/java/com_redhat_et_libguestfs_GuestFS.c
+++ b/java/com_redhat_et_libguestfs_GuestFS.c
@@ -2399,3 +2399,24 @@ Java_com_redhat_et_libguestfs_GuestFS__1get_1e2uuid
return jr;
}
+JNIEXPORT jint JNICALL
+Java_com_redhat_et_libguestfs_GuestFS__1fsck
+ (JNIEnv *env, jobject obj, jlong jg, jstring jfstype, jstring jdevice)
+{
+ guestfs_h *g = (guestfs_h *) (long) jg;
+ int r;
+ const char *fstype;
+ const char *device;
+
+ fstype = (*env)->GetStringUTFChars (env, jfstype, NULL);
+ device = (*env)->GetStringUTFChars (env, jdevice, NULL);
+ r = guestfs_fsck (g, fstype, device);
+ (*env)->ReleaseStringUTFChars (env, jfstype, fstype);
+ (*env)->ReleaseStringUTFChars (env, jdevice, device);
+ if (r == -1) {
+ throw_exception (env, guestfs_last_error (g));
+ return 0;
+ }
+ return (jint) r;
+}
+