lkml.org 
[lkml]   [2000]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: fcntl(2) and other file systems like XFS
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.544 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site