diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-06-30 11:17:06 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-06-30 13:10:44 +0100 |
commit | f68b3ac861ae607a333211c775dded82ae2b2c4a (patch) | |
tree | 03dfee58ccfd723bcbc9dc6c6d7270629ae4489d /ocaml/guestfs_c_actions.c | |
parent | 3d15f7e652340777514ff30c3cfc560a90b612ec (diff) | |
download | libguestfs-f68b3ac861ae607a333211c775dded82ae2b2c4a.tar.gz libguestfs-f68b3ac861ae607a333211c775dded82ae2b2c4a.tar.xz libguestfs-f68b3ac861ae607a333211c775dded82ae2b2c4a.zip |
Generated code for 'set_memsize'/'get_memsize' calls.
Diffstat (limited to 'ocaml/guestfs_c_actions.c')
-rw-r--r-- | ocaml/guestfs_c_actions.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/ocaml/guestfs_c_actions.c b/ocaml/guestfs_c_actions.c index 3eedbda6..6e937f45 100644 --- a/ocaml/guestfs_c_actions.c +++ b/ocaml/guestfs_c_actions.c @@ -1543,6 +1543,51 @@ ocaml_guestfs_end_busy (value gv) } CAMLprim value +ocaml_guestfs_set_memsize (value gv, value memsizev) +{ + CAMLparam2 (gv, memsizev); + CAMLlocal1 (rv); + + guestfs_h *g = Guestfs_val (gv); + if (g == NULL) + caml_failwith ("set_memsize: used handle after closing it"); + + int memsize = Int_val (memsizev); + int r; + + caml_enter_blocking_section (); + r = guestfs_set_memsize (g, memsize); + caml_leave_blocking_section (); + if (r == -1) + ocaml_guestfs_raise_error (g, "set_memsize"); + + rv = Val_unit; + CAMLreturn (rv); +} + +CAMLprim value +ocaml_guestfs_get_memsize (value gv) +{ + CAMLparam1 (gv); + CAMLlocal1 (rv); + + guestfs_h *g = Guestfs_val (gv); + if (g == NULL) + caml_failwith ("get_memsize: used handle after closing it"); + + int r; + + caml_enter_blocking_section (); + r = guestfs_get_memsize (g); + caml_leave_blocking_section (); + if (r == -1) + ocaml_guestfs_raise_error (g, "get_memsize"); + + rv = Val_int (r); + CAMLreturn (rv); +} + +CAMLprim value ocaml_guestfs_mount (value gv, value devicev, value mountpointv) { CAMLparam3 (gv, devicev, mountpointv); |