[Pkg-libvirt-commits] [libguestfs] 33/36: ocaml: Add handling for errno EINVAL.

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:13:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.29.47
in repository libguestfs.

commit 94ea635fb1334b92c4c137ae042e972db416ee19
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Thu Jun 18 09:52:16 2015 +0100

    ocaml: Add handling for errno EINVAL.
---
 generator/ocaml.ml | 3 +++
 ocaml/guestfs-c.c  | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/generator/ocaml.ml b/generator/ocaml.ml
index d2a4690..05c7456 100644
--- a/generator/ocaml.ml
+++ b/generator/ocaml.ml
@@ -132,6 +132,7 @@ val last_errno : t -> int
     which you can use to test the return value of {!Guestfs.last_errno}. *)
 
 module Errno : sig
+  val errno_EINVAL : int
   val errno_ENOTSUP : int
   val errno_EPERM : int
   val errno_ESRCH : int
@@ -286,6 +287,8 @@ external event_to_string : event list -> string
 external last_errno : t -> int = \"ocaml_guestfs_last_errno\"
 
 module Errno = struct
+  external einval : unit -> int = \"ocaml_guestfs_get_EINVAL\" \"noalloc\"
+  let errno_EINVAL = einval ()
   external enotsup : unit -> int = \"ocaml_guestfs_get_ENOTSUP\" \"noalloc\"
   let errno_ENOTSUP = enotsup ()
   external eperm : unit -> int = \"ocaml_guestfs_get_EPERM\" \"noalloc\"
diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c
index f1a941c..9603f04 100644
--- a/ocaml/guestfs-c.c
+++ b/ocaml/guestfs-c.c
@@ -63,6 +63,7 @@ value ocaml_guestfs_set_event_callback (value gv, value closure, value events);
 value ocaml_guestfs_delete_event_callback (value gv, value eh);
 value ocaml_guestfs_event_to_string (value events);
 value ocaml_guestfs_last_errno (value gv);
+value ocaml_guestfs_get_EINVAL (value unitv);
 value ocaml_guestfs_get_ENOTSUP (value unitv);
 value ocaml_guestfs_get_EPERM (value unitv);
 value ocaml_guestfs_get_ESRCH (value unitv);
@@ -444,6 +445,13 @@ ocaml_guestfs_last_errno (value gv)
 
 /* NB: "noalloc" function. */
 value
+ocaml_guestfs_get_EINVAL (value unitv)
+{
+  return Val_int (EINVAL);
+}
+
+/* NB: "noalloc" function. */
+value
 ocaml_guestfs_get_ENOTSUP (value unitv)
 {
   return Val_int (ENOTSUP);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list