On Tue, Jan 24, 2012 at 5:07 AM, Eric Blake <ebl...@redhat.com> wrote: > > Can -readconfig support reading from an inherited fd, rather than only > taking a file name that qemu has to open()? > ... > > Can you give an actual command line that uses -readconfig, as part of > your example? >
Thanks for the review Eric. I will update the patch with an example using -readconfig and fix the typo. Yes, -readconfig can read from a pipe() and it can also read from an arbitrary file descriptor. Reading from a pipe : cat iscsi.conf | ./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -display vnc=127.0.0.1:0 -drive file=iscsi://127.0.0.1/iqn.ronnie.test/1 -readconfig /proc/self/fd/0 Read from an arbitrary filedescriptor inherited from the parent process : 9<iscsi.conf ./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -display vnc=127.0.0.1:0 -drive file=iscsi://127.0.0.1/iqn.ronnie.test/1 -readconfig /proc/self/fd/9 The second example shows how you can have qemu read from an arbitrary descriptor that is inherited from the parent process (the shell in this case) I imagine you would pipe() then fork() and pass the read side of your pipe to qemu here ? If this works well or at least in some acceptable form it might be useful for other users needing to pass sensitive config data into QEMU too? regards ronnie sahlberg