diff options
Diffstat (limited to 'ocaml')
-rw-r--r-- | ocaml/guestfs_c.c | 11 |
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; +} |