diff options
| author | Richard Jones <rjones@redhat.com> | 2009-06-08 17:44:18 +0100 |
|---|---|---|
| committer | Richard Jones <rjones@redhat.com> | 2009-06-08 17:44:18 +0100 |
| commit | 460d139e6a52da67a4f1947035b1978610349f78 (patch) | |
| tree | 798177aa71bc9615074cd1a9a351ff4b38165c7c /ocaml | |
| parent | 3de234656bc61a2d35b0f1a9ccb1e6ef7535166b (diff) | |
| download | libguestfs-460d139e6a52da67a4f1947035b1978610349f78.tar.gz libguestfs-460d139e6a52da67a4f1947035b1978610349f78.tar.xz libguestfs-460d139e6a52da67a4f1947035b1978610349f78.zip | |
Generated code for ntfs_3g_probe command.
Diffstat (limited to 'ocaml')
| -rw-r--r-- | ocaml/guestfs.ml | 1 | ||||
| -rw-r--r-- | ocaml/guestfs.mli | 3 | ||||
| -rw-r--r-- | ocaml/guestfs_c_actions.c | 24 |
3 files changed, 28 insertions, 0 deletions
diff --git a/ocaml/guestfs.ml b/ocaml/guestfs.ml index 7df33080..fb432142 100644 --- a/ocaml/guestfs.ml +++ b/ocaml/guestfs.ml @@ -276,3 +276,4 @@ external resize2fs : t -> string -> unit = "ocaml_guestfs_resize2fs" external find : t -> string -> string array = "ocaml_guestfs_find" external e2fsck_f : t -> string -> unit = "ocaml_guestfs_e2fsck_f" external sleep : t -> int -> unit = "ocaml_guestfs_sleep" +external ntfs_3g_probe : t -> bool -> string -> int = "ocaml_guestfs_ntfs_3g_probe" diff --git a/ocaml/guestfs.mli b/ocaml/guestfs.mli index 6f77bb93..859774aa 100644 --- a/ocaml/guestfs.mli +++ b/ocaml/guestfs.mli @@ -607,3 +607,6 @@ val e2fsck_f : t -> string -> unit val sleep : t -> int -> unit (** sleep for some seconds *) +val ntfs_3g_probe : t -> bool -> string -> int +(** probe NTFS volume *) + diff --git a/ocaml/guestfs_c_actions.c b/ocaml/guestfs_c_actions.c index 615d209e..45c9883f 100644 --- a/ocaml/guestfs_c_actions.c +++ b/ocaml/guestfs_c_actions.c @@ -4174,3 +4174,27 @@ ocaml_guestfs_sleep (value gv, value secsv) CAMLreturn (rv); } +CAMLprim value +ocaml_guestfs_ntfs_3g_probe (value gv, value rwv, value devicev) +{ + CAMLparam3 (gv, rwv, devicev); + CAMLlocal1 (rv); + + guestfs_h *g = Guestfs_val (gv); + if (g == NULL) + caml_failwith ("ntfs_3g_probe: used handle after closing it"); + + int rw = Bool_val (rwv); + const char *device = String_val (devicev); + int r; + + caml_enter_blocking_section (); + r = guestfs_ntfs_3g_probe (g, rw, device); + caml_leave_blocking_section (); + if (r == -1) + ocaml_guestfs_raise_error (g, "ntfs_3g_probe"); + + rv = Val_int (r); + CAMLreturn (rv); +} + |
