From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqRrx-0004eM-8t for qemu-devel@nongnu.org; Thu, 26 Jan 2012 11:08:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqRrr-0007uF-La for qemu-devel@nongnu.org; Thu, 26 Jan 2012 11:08:13 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:47646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqRrr-0007u1-BK for qemu-devel@nongnu.org; Thu, 26 Jan 2012 11:08:07 -0500 Message-ID: <4F217A65.9090307@msgid.tls.msk.ru> Date: Thu, 26 Jan 2012 20:08:05 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1327140203-3165-1-git-send-email-ronniesahlberg@gmail.com> <1327140203-3165-2-git-send-email-ronniesahlberg@gmail.com> <4F1DA1D5.1010600@redhat.com> <4F20266F.20409@redhat.com> <4F211813.7060404@redhat.com> <4F211C9F.4030209@redhat.com> <4F216953.4050803@msgid.tls.msk.ru> In-Reply-To: <4F216953.4050803@msgid.tls.msk.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ronnie sahlberg Cc: Kevin Wolf , Eric Blake , qemu-devel@nongnu.org 26.01.2012 18:55, Michael Tokarev wrote: > 26.01.2012 13:54, ronnie sahlberg wrote: >> Ok so what about this >> >> You use a filename starting with "/proc/self/fd/" and you dont have a >> proc filesystem mounted? you are on your own! BTW, usual idiom (which was implemented in gawk for example) is to use /dev/fd/N here, not /proc/self/fd/N which is really linux-specific. Linux traditionally had that symlinked to /proc/self/fd, so it should work as is on linux too. (I think /dev/fd/N is more widely used than /proc/self/fd -- solaris? *bsd?) /mjt > No you're not: > >>>> IF ! STRNCMP (filename, "/proc/self/fd/", 14) THEN >>>> fopen(filename, "r") >>>> ELSE >>>> fdopen(atoi(filename+14), "r") >>>> FI > > If the filename starts with /proc/self/fd/, qemu will > not try to open that file but parse the rest of the > string as a filedescriptor number. > > /mjt >