summaryrefslogtreecommitdiffstats
path: root/ocaml/guestfs_c_actions.c
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-05-21 16:18:16 +0100
committerRichard Jones <rjones@redhat.com>2009-05-21 16:18:16 +0100
commit3e408f493496597dc026d20778837f421f05a9dd (patch)
tree5aee1850ae052c36ab56de764d4130789280c7a8 /ocaml/guestfs_c_actions.c
parent0f81d0941a2705d49bc129f69924265fa60d9677 (diff)
downloadlibguestfs-3e408f493496597dc026d20778837f421f05a9dd.tar.gz
libguestfs-3e408f493496597dc026d20778837f421f05a9dd.tar.xz
libguestfs-3e408f493496597dc026d20778837f421f05a9dd.zip
Generated code for e2fsck-f command.
Diffstat (limited to 'ocaml/guestfs_c_actions.c')
-rw-r--r--ocaml/guestfs_c_actions.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/ocaml/guestfs_c_actions.c b/ocaml/guestfs_c_actions.c
index 0dcaf3f3..795a0f36 100644
--- a/ocaml/guestfs_c_actions.c
+++ b/ocaml/guestfs_c_actions.c
@@ -3452,3 +3452,26 @@ ocaml_guestfs_find (value gv, value directoryv)
CAMLreturn (rv);
}
+CAMLprim value
+ocaml_guestfs_e2fsck_f (value gv, value devicev)
+{
+ CAMLparam2 (gv, devicev);
+ CAMLlocal1 (rv);
+
+ guestfs_h *g = Guestfs_val (gv);
+ if (g == NULL)
+ caml_failwith ("e2fsck_f: used handle after closing it");
+
+ const char *device = String_val (devicev);
+ int r;
+
+ caml_enter_blocking_section ();
+ r = guestfs_e2fsck_f (g, device);
+ caml_leave_blocking_section ();
+ if (r == -1)
+ ocaml_guestfs_raise_error (g, "e2fsck_f");
+
+ rv = Val_unit;
+ CAMLreturn (rv);
+}
+