summaryrefslogtreecommitdiffstats
path: root/ocaml/guestfs_c_actions.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-06-29 12:26:11 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-06-29 12:26:11 +0100
commitb2ed0f4c55c2bd3d07341ba2207f0cb238eb4e18 (patch)
tree1a8afad7895f932501ff806a5dd3bfc9f2ed5f26 /ocaml/guestfs_c_actions.c
parent405cf2a5772611ea05cca9fefa843154a9bc64a3 (diff)
downloadlibguestfs-b2ed0f4c55c2bd3d07341ba2207f0cb238eb4e18.tar.gz
libguestfs-b2ed0f4c55c2bd3d07341ba2207f0cb238eb4e18.tar.xz
libguestfs-b2ed0f4c55c2bd3d07341ba2207f0cb238eb4e18.zip
Generated code for df / df-h.
Diffstat (limited to 'ocaml/guestfs_c_actions.c')
-rw-r--r--ocaml/guestfs_c_actions.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/ocaml/guestfs_c_actions.c b/ocaml/guestfs_c_actions.c
index d8b05677..04be8180 100644
--- a/ocaml/guestfs_c_actions.c
+++ b/ocaml/guestfs_c_actions.c
@@ -4542,3 +4542,49 @@ ocaml_guestfs_tail_n (value gv, value nrlinesv, value pathv)
CAMLreturn (rv);
}
+CAMLprim value
+ocaml_guestfs_df (value gv)
+{
+ CAMLparam1 (gv);
+ CAMLlocal1 (rv);
+
+ guestfs_h *g = Guestfs_val (gv);
+ if (g == NULL)
+ caml_failwith ("df: used handle after closing it");
+
+ char *r;
+
+ caml_enter_blocking_section ();
+ r = guestfs_df (g);
+ caml_leave_blocking_section ();
+ if (r == NULL)
+ ocaml_guestfs_raise_error (g, "df");
+
+ rv = caml_copy_string (r);
+ free (r);
+ CAMLreturn (rv);
+}
+
+CAMLprim value
+ocaml_guestfs_df_h (value gv)
+{
+ CAMLparam1 (gv);
+ CAMLlocal1 (rv);
+
+ guestfs_h *g = Guestfs_val (gv);
+ if (g == NULL)
+ caml_failwith ("df_h: used handle after closing it");
+
+ char *r;
+
+ caml_enter_blocking_section ();
+ r = guestfs_df_h (g);
+ caml_leave_blocking_section ();
+ if (r == NULL)
+ ocaml_guestfs_raise_error (g, "df_h");
+
+ rv = caml_copy_string (r);
+ free (r);
+ CAMLreturn (rv);
+}
+