This series adds command line file descriptor passing support to the -drive option. This is a follow-on to the existing QMP fd passing support provided in the following patch series: comments.gmane.org/gmane.comp.emulators.qemu/165463
An example of using the new -drive fd and opaque options: qemu-kvm -drive fd=24,opaque="rdwr:/path/file",index=0,media=disk When an fd, and optionally opaque, are passed with -drive, they are added to an automatically generated fd set. The file name is also generated in the form of "/dev/fdset/nnn", where nnn is the fd set ID. 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. Corey Bryant (4): monitor: Less restrictive fd matching for fd sets monitor: Enable adding an inherited fd to an fd set qemu-config: Add -drive fd and opaque options blockdev: Process -drive fd and opaque options blockdev.c | 40 +++++++++++++++++- monitor.c | 128 ++++++++++++++++++++++++++++++++------------------------ monitor.h | 3 ++ qemu-config.c | 8 ++++ qemu-options.hx | 15 ++++++- 5 files changed, 135 insertions(+), 59 deletions(-) -- 1.7.11.4