Subject: Re: ENXIO or ENODEV when r-opening a w-only device?
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 01/04/2006 16:49:02
--uxuisgdDHaNETlh8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 04, 2006 at 07:34:22PM -0500, Steven M. Bellovin wrote:
> 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=20
> writing?  A CD-Ro for writing?  I'd return the same error.

I don't think such an error would be correct as it's EROFS. The problem=20
isn't that things are _read_ only, it's that they are _write_ only. :-)

Take care,

Bill

--uxuisgdDHaNETlh8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFDvGz9Wz+3JHUci9cRAlg0AJ4voAHtZQSCQwMe16PW0zAcjirfWgCcCBG9
3+caveUSFD4+K/T8Hs0yNlw=
=TCF4
-----END PGP SIGNATURE-----

--uxuisgdDHaNETlh8--