[Top][All Lists]

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

[Qemu-devel] [RFC 2/5] block: add new command line parameter that and pr

From: Stefan Hajnoczi
Subject: [Qemu-devel] [RFC 2/5] block: add new command line parameter that and protocol description
Date: Tue, 1 May 2012 16:31:44 +0100

From: Anthony Liguori <address@hidden>

Signed-off-by: Anthony Liguori <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
 qemu-options.hx |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/qemu-options.hx b/qemu-options.hx
index a169792..ccf4d1d 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2724,6 +2724,48 @@ DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log,
     "-qtest-log LOG  specify tracing options\n",
+DEF("open-hook-fd", HAS_ARG, QEMU_OPTION_open_hook_fd,
+    "-open-hook-fd <fd>\n"
+    "                delegate opens to external process using <fd>\n", 
address@hidden -open-hook-fd @var{fd}
address@hidden -open-hook-fd
+Delegates open()s to an external process using @var<fd> to communicate 
address@hidden<fd> should be an open Unix Domain socket pipe that file 
descriptors can be
+received from.  The protocol the socket uses is a simple request/response 
+by the client.  All integers are in host byte order.  It is assumed that this 
+is only ever used on the same physical machine.  It is currently defined as:
+u32 message_size
+u32 command
+u8  payload[message_size - 8]
+The contents of payload depend on command.  Currently the following commands 
+1. QEMU_OPEN (1)
+The full message will be:
+u32 message_size
+u32 command = 1
+u32 flags (O_ flags defined by libc)
+u32 mode (mode_t flags as defined by libc)
+u16 filename_len;
+u8  filename[filename_len]
+The server will then respond with:
+u32 message_size
+u32 command = 1
+s32 result
+If result is < 0, the value will be negated errno value as defined in errno.h. 
+result is equal to 0, then there will also be a file descriptor available via 
+in the extended sendmsg data.
 HXCOMM This is the last statement. Insert new options before this line!
 @end table

reply via email to

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