summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorCorey Bryant <coreyb@linux.vnet.ibm.com>2012-10-18 15:19:34 -0400
committerKevin Wolf <kwolf@redhat.com>2012-10-24 10:26:19 +0200
commit587ed6be0b6331b11169da8846b8442840d5428c (patch)
treeba82b977f169e27edbab2539ab179d63d7c1b146 /block.c
parentebe52b592dd5867fce7238f49b8c0416c3eedb6c (diff)
downloadqemu-587ed6be0b6331b11169da8846b8442840d5428c.tar.gz
qemu-config: Add new -add-fd command line option
This option can be used for passing file descriptors on the command line. It mirrors the existing add-fd QMP command which allows an fd to be passed to QEMU via SCM_RIGHTS and added to an fd set. This can be combined with commands such as -drive to link file descriptors in an fd set to a drive: qemu-kvm -add-fd fd=3,set=2,opaque="rdwr:/path/to/file" -add-fd fd=4,set=2,opaque="rdonly:/path/to/file" -drive file=/dev/fdset/2,index=0,media=disk This example adds dups of fds 3 and 4, and the accompanying opaque strings to the fd set with ID=2. qemu_open() already knows how to handle a filename of this format. qemu_open() searches the corresponding fd set for an fd and when it finds a match, QEMU goes on to use a dup of that fd just like it would have used an fd that it opened itself. Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
0 files changed, 0 insertions, 0 deletions