|
From: | Michael Tokarev |
Subject: | Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI |
Date: | Thu, 26 Jan 2012 20:08:05 +0400 |
User-agent: | Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111120 Icedove/8.0 |
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") FIIf 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
[Prev in Thread] | Current Thread | [Next in Thread] |