Received: from eggs.gnu.org ([208.118.235.92]:41316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3jip-0000eV-39 for qemu-devel@nongnu.org; Sat, 03 Mar 2012 02:49:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3jif-0008CJ-Td for qemu-devel@nongnu.org; Sat, 03 Mar 2012 02:49:42 -0500 Received: from mail-pw0-f45.google.com ([209.85.160.45]:35067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3jif-0008Bo-Hv for qemu-devel@nongnu.org; Sat, 03 Mar 2012 02:49:33 -0500 Received: by pbcuo5 with SMTP id uo5so2128329pbc.4 for ; Fri, 02 Mar 2012 23:49:31 -0800 (PST) From: Ronnie Sahlberg Date: Sat, 3 Mar 2012 18:49:16 +1100 Message-Id: <1330760957-17122-1-git-send-email-ronniesahlberg@gmail.com> Subject: [Qemu-devel] [PATCH] readconfig: add emulation of /dev/fd/ to platforms that that lacks this API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, kwolf@redhat.com Please find a patch to -readconfig. On many platforms -readconfig /dev/fd/ can be used to read from an already opened and inherited filedescriptor . On platforms that do not natively provide /dev/fd/ 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/ 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