lkml.org 
[lkml]   [1999]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Why is chmod(2)?
Werner Almesberger wrote:
> Jamie Lokier wrote:
> > I recommend coding a patch to find out if O_NONE is really as easy as it
> > seems.
>
> Note that the equivalent of O_NONE has been around on Linux since '92 or
> so (numeric value 3, I usually call it O_NOACCESS). It is required for
> things like fdformat and setfdprm. LILO also uses it. So the "main code
> path" already supports this. Drivers looking at f_mode or f_flags may be
> a different story, though.

I'm suggesting a file opened O_NONE would never call driver code.
It's just an inode reference, for the same kind of operations you can do
with a file name.

So fstat() and close() are allowed, but ioctl(), fcntl(), read()
etc. will all fail without calling any drivers or filesystem code.

-- Jamie

-
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:54    [W:0.066 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site