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



Reply via email to