Re: NTFS-like streams?

From: Andi Kleen (ak@suse.de)
Date: Sat Aug 12 2000 - 19:05:14 EST


On Sat, Aug 12, 2000 at 07:36:08PM -0400, Alexander Viro wrote:
>
>
> On Sun, 13 Aug 2000, Andi Kleen wrote:
>
> > It is already implemented I think:
> >
> > sprintf(buf, "/proc/self/fd/%d", fd);
> > readlink(buf, yourbuf, size);
>
> That has some problems:
> * expects procfs in place
> * no reliable way to tell the unlinked files from the normal ones.

There currently is a slight name space collision "(deleted)" is a valid
filename, but you could change it to //deleted/mount/inode or some such
to avoid that.

I just assume that /proc is in place, just like near all Linux programs
in existence assume that /etc is in place and contains certain files, or
networking assumes that you once did ifconfig lo. If you didn't, bad luck.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:28 EST