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