|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH] readconfig: add emulation of /dev/fd/ to platforms that that lacks this API |
Date: | Mon, 19 Mar 2012 11:43:43 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
On 03/03/2012 01:49 AM, Ronnie Sahlberg wrote:
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>
What platforms don't provide /dev/fd/<n> where fd passing makes sense? Regards, Anthony Liguori
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
[Prev in Thread] | Current Thread | [Next in Thread] |