From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9fgU-0005Tv-ML for qemu-devel@nongnu.org; Mon, 19 Mar 2012 12:43:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9fgT-0004JN-10 for qemu-devel@nongnu.org; Mon, 19 Mar 2012 12:43:50 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:38858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9fgS-0004J8-RB for qemu-devel@nongnu.org; Mon, 19 Mar 2012 12:43:48 -0400 Received: by pbcuo5 with SMTP id uo5so1474135pbc.4 for ; Mon, 19 Mar 2012 09:43:47 -0700 (PDT) Message-ID: <4F67623F.2010304@codemonkey.ws> Date: Mon, 19 Mar 2012 11:43:43 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1330760957-17122-1-git-send-email-ronniesahlberg@gmail.com> In-Reply-To: <1330760957-17122-1-git-send-email-ronniesahlberg@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [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: Ronnie Sahlberg Cc: kwolf@redhat.com, qemu-devel@nongnu.org On 03/03/2012 01:49 AM, Ronnie Sahlberg wrote: > 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/ What platforms don't provide /dev/fd/ 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/ 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 > >