mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
ocaml: Add ESRCH to Guestfs.Errno module.
This commit is contained in:
@@ -133,6 +133,7 @@ val last_errno : t -> int
|
||||
|
||||
module Errno : sig
|
||||
val errno_ENOTSUP : int
|
||||
val errno_ESRCH : int
|
||||
end
|
||||
|
||||
";
|
||||
@@ -266,6 +267,8 @@ external last_errno : t -> int = \"ocaml_guestfs_last_errno\"
|
||||
module Errno = struct
|
||||
external enotsup : unit -> int = \"ocaml_guestfs_get_ENOTSUP\" \"noalloc\"
|
||||
let errno_ENOTSUP = enotsup ()
|
||||
external esrch : unit -> int = \"ocaml_guestfs_get_ESRCH\" \"noalloc\"
|
||||
let errno_ESRCH = esrch ()
|
||||
end
|
||||
|
||||
(* Give the exceptions names, so they can be raised from the C code. *)
|
||||
|
||||
@@ -64,6 +64,7 @@ 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_ENOTSUP (value unitv);
|
||||
value ocaml_guestfs_get_ESRCH (value unitv);
|
||||
|
||||
/* Allocate handles and deal with finalization. */
|
||||
static void
|
||||
@@ -446,3 +447,10 @@ ocaml_guestfs_get_ENOTSUP (value unitv)
|
||||
{
|
||||
return Val_int (ENOTSUP);
|
||||
}
|
||||
|
||||
/* NB: "noalloc" function. */
|
||||
value
|
||||
ocaml_guestfs_get_ESRCH (value unitv)
|
||||
{
|
||||
return Val_int (ESRCH);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user