qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] readconfig: add emulation of /dev/fd/ to platforms


From: Ronnie Sahlberg
Subject: [Qemu-devel] [PATCH] readconfig: add emulation of /dev/fd/ to platforms that that lacks this API
Date: Sat, 3 Mar 2012 18:49:16 +1100

Please find a patch to -readconfig.

On many platforms -readconfig /dev/fd/<n> can be used to read from an already 
opened and inherited filedescriptor <n>.

On platforms that do not natively provide /dev/fd/<n> 
add emulation of this by checking if the ofiginal fopen(path) failed, then IF
the path starts with /dev/fd/ then try to read the descriptorvalue and fdopen() 
it.


It means that we can use -readconfig /dev/fd/<n> on all platforms. On those 
that provide a /dev/fd we just open that file. On those that do not we emulate 
it.


regards
ronnie sahlberg




reply via email to

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