Subject: Re: ENXIO or ENODEV when r-opening a w-only device?
To: Chapman Flack <nblists@anastigmatix.net>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: tech-kern
Date: 01/04/2006 19:34:22
In message <43BC5508.3040709@anastigmatix.net>, Chapman Flack writes:
>matthew green wrote:
>> EPERM?
>
>Not the way I read it ... EPERM is specifically about whether
>the open would be allowed by the checks on your identity and
>the mode bits on the node.  But you can have all the permissions
>in the world and when you try to open /dev/cardpunch for reading,
>something's still gotta give. It's an inherent device capability
>issue, not a permission issue.
>
What do you get if you open a device on a read-only file system for 
writing?  A CD-Ro for writing?  I'd return the same error.

		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb