Am 25.01.2012 16:57, schrieb Eric Blake: > On 01/24/2012 11:47 PM, ronnie sahlberg wrote: >> 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 > > That requires the existence of procfs, which is not portable (although > it does work on Linux). I'd rather see: > > -readconfig fd:9 > > which matches things for -incoming; that is, if -readconfig starts with > '/' or '.', it is a filename; otherwise, it is a protocol:value > designation, where we recognize at least the fd: protocol where a value > is the incoming fd, but we could also recognize things like exec: > protocol which is an arbitrary command to use via popen.
Magic prefixes like this have one big problem: What if someone has a config file called "fd:9"? We have the very same problem with protocols in the block layer and while in the general case it's a convenient syntax, we've come to hate it in cases where it misinterprets things. Kevin