On 11/13/2024 3:54 PM, Peter Xu wrote:
On Fri, Nov 01, 2024 at 06:47:44AM -0700, Steve Sistare wrote:
Define functions to put/get file descriptors to/from a QEMUFile, for qio
channels that support SCM_RIGHTS.  Maintain ordering such that
   put(A), put(fd), put(B)
followed by
   get(A), get(fd), get(B)
always succeeds.  Other get orderings may succeed but are not guaranteed.

Signed-off-by: Steve Sistare <steven.sist...@oracle.com>

Reviewed-by: Peter Xu <pet...@redhat.com>

  struct QEMUFile {
      QIOChannel *ioc;
      bool is_writable;
@@ -51,6 +56,9 @@ struct QEMUFile {
int last_error;
      Error *last_error_obj;
+
+    bool fd_pass;

One nitpick: I'd rename this to allow_fd_pass, or any name clearly shows
that it's a capability.

Will do - steve


+    QTAILQ_HEAD(, FdEntry) fds;
  };



Reply via email to