qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands
Date: Wed, 08 Jul 2009 18:26:53 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

On 07/08/2009 05:57 PM, Mark McLoughlin wrote:
Add monitor commands to support passing file descriptors via
SCM_RIGHTS.

getfd assigns the passed file descriptor a name for use with other
monitor commands.

closefd allows passed file descriptors to be closed. If a monitor
command actually uses a named file descriptor, closefd will not be
required.



@@ -70,6 +70,14 @@ typedef struct mon_cmd_t {
      const char *help;
  } mon_cmd_t;

+/* file descriptors passed via SCM_RIGHTS */
+typedef struct mon_fd_t mon_fd_t;
+struct mon_fd_t {
+    char *name;
+    int fd;
+    LIST_ENTRY(mon_fd_t) next;
+};
+

The _t namespace is reserved by posix and not used for structures in qemu anyway. I see there's precedent a few lines above but let's not introduce new violations.

+
+    fd = dup(fd);

Why?

--
error compiling committee.c: too many arguments to function





reply via email to

[Prev in Thread] Current Thread [Next in Thread]