summaryrefslogtreecommitdiffstats
path: root/ocaml
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-05-08 15:20:36 +0100
committerRichard Jones <rjones@redhat.com>2009-05-08 15:20:36 +0100
commit15e0fd573a87488c66cb3a6f0da01f3ab5f2f6ed (patch)
treecf462fcc7f390c56be66ba6fb72fbfd79ccbc598 /ocaml
parent77c3f9d0ed25218fc3f24cee083a2083157d8e0a (diff)
downloadlibguestfs-15e0fd573a87488c66cb3a6f0da01f3ab5f2f6ed.tar.gz
libguestfs-15e0fd573a87488c66cb3a6f0da01f3ab5f2f6ed.tar.xz
libguestfs-15e0fd573a87488c66cb3a6f0da01f3ab5f2f6ed.zip
Generated code to support last 3 commits.
Diffstat (limited to 'ocaml')
-rw-r--r--ocaml/guestfs.ml1
-rw-r--r--ocaml/guestfs.mli3
-rw-r--r--ocaml/guestfs_c_actions.c22
3 files changed, 26 insertions, 0 deletions
diff --git a/ocaml/guestfs.ml b/ocaml/guestfs.ml
index ab958b70..39d23293 100644
--- a/ocaml/guestfs.ml
+++ b/ocaml/guestfs.ml
@@ -136,6 +136,7 @@ external is_busy : t -> bool = "ocaml_guestfs_is_busy"
external get_state : t -> int = "ocaml_guestfs_get_state"
external set_busy : t -> unit = "ocaml_guestfs_set_busy"
external set_ready : t -> unit = "ocaml_guestfs_set_ready"
+external end_busy : t -> unit = "ocaml_guestfs_end_busy"
external mount : t -> string -> string -> unit = "ocaml_guestfs_mount"
external sync : t -> unit = "ocaml_guestfs_sync"
external touch : t -> string -> unit = "ocaml_guestfs_touch"
diff --git a/ocaml/guestfs.mli b/ocaml/guestfs.mli
index d44fb060..21e6eeb5 100644
--- a/ocaml/guestfs.mli
+++ b/ocaml/guestfs.mli
@@ -187,6 +187,9 @@ val set_busy : t -> unit
val set_ready : t -> unit
(** set state to ready *)
+val end_busy : t -> unit
+(** leave the busy state *)
+
val mount : t -> string -> string -> unit
(** mount a guest disk at a position in the filesystem *)
diff --git a/ocaml/guestfs_c_actions.c b/ocaml/guestfs_c_actions.c
index a707897a..fa352fcc 100644
--- a/ocaml/guestfs_c_actions.c
+++ b/ocaml/guestfs_c_actions.c
@@ -800,6 +800,28 @@ ocaml_guestfs_set_ready (value gv)
}
CAMLprim value
+ocaml_guestfs_end_busy (value gv)
+{
+ CAMLparam1 (gv);
+ CAMLlocal1 (rv);
+
+ guestfs_h *g = Guestfs_val (gv);
+ if (g == NULL)
+ caml_failwith ("end_busy: used handle after closing it");
+
+ int r;
+
+ caml_enter_blocking_section ();
+ r = guestfs_end_busy (g);
+ caml_leave_blocking_section ();
+ if (r == -1)
+ ocaml_guestfs_raise_error (g, "end_busy");
+
+ rv = Val_unit;
+ CAMLreturn (rv);
+}
+
+CAMLprim value
ocaml_guestfs_mount (value gv, value devicev, value mountpointv)
{
CAMLparam3 (gv, devicev, mountpointv);