aboutsummaryrefslogtreecommitdiff
path: root/qemu-monitor.hx
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-07-22 09:11:40 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-27 08:39:28 -0500
commitf07918fdff76ace82b1ca3e53bbcddef069eb314 (patch)
tree3328e81b61bb0e1cc4144d840bf179a205af7733 /qemu-monitor.hx
parent7d1740590b6550b2b8ab4901e4f0b704d9733383 (diff)
Add getfd and closefd monitor commands
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. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-monitor.hx')
-rw-r--r--qemu-monitor.hx18
1 files changed, 18 insertions, 0 deletions
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 70e24758cc..11bdb2c2dd 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -628,6 +628,24 @@ STEXI
Inject an MCE on the given CPU (x86 only).
ETEXI
+ { "getfd", "s", do_getfd, "getfd name",
+ "receive a file descriptor via SCM rights and assign it a name" },
+STEXI
+@item getfd @var{fdname}
+If a file descriptor is passed alongside this command using the SCM_RIGHTS
+mechanism on unix sockets, it is stored using the name @var{fdname} for
+later use by other monitor commands.
+ETEXI
+
+ { "closefd", "s", do_closefd, "closefd name",
+ "close a file descriptor previously passed via SCM rights" },
+STEXI
+@item closefd @var{fdname}
+Close the file descriptor previously assigned to @var{fdname} using the
+@code{getfd} command. This is only needed if the file descriptor was never
+used by another monitor command.
+ETEXI
+
STEXI
@end table
ETEXI