lkml.org 
[lkml]   [2000]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: access() says EROFS even for device files if /dev is mounted RO
On Tue, Nov 28, 2000 at 03:04:31PM +0100, Rogier Wolff wrote:

> Ok, so if you read the standard carefully you get a bogus result.

Why bogus? Things could have been otherwise, but the important
part is that all Unices do things the same way.

> Question: Was it meant this way, or did someone just make a mistake
> (which happened to slip through and get approved into the standard)?
>
> I happen to think the second.
>
> - Is it desirable to have a write-open of a device on a read-only
> fail? I don't think so. You can't open the initial console etc etc.

Nevertheless the standard requires this.

> - Is it desirable to have access (W_OK) and "open-for-write" return
> different results? I don't think so.

Nevertheless there have never been systems where access and open
behaved identically. An easy example is given by directories
that have write access when a w bit is set, but return EISDIR
upon open-for-write.

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

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