summaryrefslogtreecommitdiffstats
path: root/ocaml
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-07-15 14:33:29 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-07-15 14:34:21 +0100
commit60dd9494f0890dcc6c9a1cce311edc92cb992290 (patch)
treef67f2549653b42581c04a5fd9a57a36620bde533 /ocaml
parent50c54d2814b13d7d51f659600e93565dc6921b28 (diff)
downloadlibguestfs-60dd9494f0890dcc6c9a1cce311edc92cb992290.tar.gz
libguestfs-60dd9494f0890dcc6c9a1cce311edc92cb992290.tar.xz
libguestfs-60dd9494f0890dcc6c9a1cce311edc92cb992290.zip
ocaml: Add binding for guestfs_user_cancel.
Diffstat (limited to 'ocaml')
-rw-r--r--ocaml/guestfs_c.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ocaml/guestfs_c.c b/ocaml/guestfs_c.c
index a1386ec7..45b8eaed 100644
--- a/ocaml/guestfs_c.c
+++ b/ocaml/guestfs_c.c
@@ -52,6 +52,7 @@ CAMLprim value ocaml_guestfs_create (void);
CAMLprim value ocaml_guestfs_close (value gv);
CAMLprim value ocaml_guestfs_set_event_callback (value gv, value closure, value events);
CAMLprim value ocaml_guestfs_delete_event_callback (value gv, value eh);
+value ocaml_guestfs_user_cancel (value gv);
/* Allocate handles and deal with finalization. */
static void
@@ -372,3 +373,13 @@ event_callback_wrapper (guestfs_h *g,
CAMLreturn0;
}
+
+/* NB: This is and must remain a "noalloc" function. */
+value
+ocaml_guestfs_user_cancel (value gv)
+{
+ guestfs_h *g = Guestfs_val (gv);
+ if (g)
+ guestfs_user_cancel (g);
+ return Val_unit;
+}