[Libguestfs] [PATCH nbdkit v2 3/3] ocaml: Add bindings for nbdkit_peer_{pid, uid, gid}.

Eric Blake eblake at redhat.com
Mon Oct 5 13:39:41 UTC 2020


On 10/3/20 1:50 PM, Richard W.M. Jones wrote:
> ---
>  plugins/ocaml/NBDKit.mli |  7 +++++++
>  plugins/ocaml/NBDKit.ml  |  4 ++++
>  plugins/ocaml/bindings.c | 24 ++++++++++++++++++++++++
>  3 files changed, 35 insertions(+)
> 
> diff --git a/plugins/ocaml/NBDKit.mli b/plugins/ocaml/NBDKit.mli
> index ececd5fd..8abfeb49 100644
> --- a/plugins/ocaml/NBDKit.mli
> +++ b/plugins/ocaml/NBDKit.mli
> @@ -162,3 +162,10 @@ val shutdown : unit -> unit
>  
>  (** Print a debug message when nbdkit is in verbose mode. *)
>  val debug : ('a, unit, string, unit) format4 -> 'a
> +
> +(** Binding for [nbdkit_peer_pid]. *)
> +val peer_pid : unit -> int
> +(** Binding for [nbdkit_peer_uid]. *)
> +val peer_uid : unit -> int
> +(** Binding for [nbdkit_peer_gid]. *)
> +val peer_gid : unit -> int

Is int sufficient on 32-bit platforms, or do you need int32?  But on
64-bit platforms, I don't see a system ever having enough valid
uid_t/gid_t/pid_t to overflow int to the point that int64 would have
been better.

Otherwise looks fine.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20201005/c22c3d67/attachment.sig>


More information about the Libguestfs mailing list