Messages in this thread | | | From | (Linus Torvalds) | Subject | Re: fcntl(2) and other file systems like XFS | Date | 21 Mar 2000 16:38:12 -0800 |
| |
In article <20000321170722.A5496@pcep-jamie.cern.ch>, Jamie Lokier <lfs@tantalophile.demon.co.uk> wrote: > >The very nice O_NONE idea would sort this out. O_NONE means you can >always open the file object, but you can't do much with it. For a >device, the device wouldn't get opened, but fstat() would return the >same device information as stat() returns.
This used to work before, it was just undocumented.
Do a
#define O_NONE 3
and see if it still works.. I suspect it does - I was careful to have open() change the flags by doing something like
flags = (flags + 1) & 3;
which turns the O_ACCMODE bits into two nice bits (bit #0 is "readable" and bit #1 is "writable" instead of the standard O_ACCMODE braindamage).
Linus
- 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/
| |