diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-30 18:57:07 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-30 18:57:07 +0100 |
commit | 0703248d233744047515418893dac05ce013a642 (patch) | |
tree | ead0b718136e64b179b9d46f3fc314cdd49f2149 /ocaml/guestfs_c_actions.c | |
parent | c69c3695303d5a660ad093a076c2e364ae6061de (diff) | |
download | libguestfs-0703248d233744047515418893dac05ce013a642.tar.gz libguestfs-0703248d233744047515418893dac05ce013a642.tar.xz libguestfs-0703248d233744047515418893dac05ce013a642.zip |
Add generated code for 'fsck' command.
Diffstat (limited to 'ocaml/guestfs_c_actions.c')
-rw-r--r-- | ocaml/guestfs_c_actions.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ocaml/guestfs_c_actions.c b/ocaml/guestfs_c_actions.c index 9f860bad..22dc18f9 100644 --- a/ocaml/guestfs_c_actions.c +++ b/ocaml/guestfs_c_actions.c @@ -2799,3 +2799,27 @@ ocaml_guestfs_get_e2uuid (value gv, value devicev) CAMLreturn (rv); } +CAMLprim value +ocaml_guestfs_fsck (value gv, value fstypev, value devicev) +{ + CAMLparam3 (gv, fstypev, devicev); + CAMLlocal1 (rv); + + guestfs_h *g = Guestfs_val (gv); + if (g == NULL) + caml_failwith ("fsck: used handle after closing it"); + + const char *fstype = String_val (fstypev); + const char *device = String_val (devicev); + int r; + + caml_enter_blocking_section (); + r = guestfs_fsck (g, fstype, device); + caml_leave_blocking_section (); + if (r == -1) + ocaml_guestfs_raise_error (g, "fsck"); + + rv = Val_int (r); + CAMLreturn (rv); +} + |