summaryrefslogtreecommitdiff
path: root/sys/scsi/sd.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2012-07-09 12:58:02 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2012-07-09 12:58:02 +0000
commitc0b5c1388ada774aff32bb8702239b1fadb26bca (patch)
tree2164eb039f7890908ae71f89de51c19e513d81db /sys/scsi/sd.c
parentc79a1a245e76a0716ee43c23d5df70b2e1f94f46 (diff)
Revert previous.
The standards gpds are jealous gods. kettenis@ and beck@ have shown EROFS is the wrong thing to return. So revert to EACCES until a better error code is decided on.
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r--sys/scsi/sd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index fe94b7b8a47..0cb8b51a30a 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.241 2012/07/08 14:30:59 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.242 2012/07/09 12:58:01 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -353,7 +353,7 @@ sdopen(dev_t dev, int flag, int fmt, struct proc *p)
}
if (ISSET(flag, FWRITE) && ISSET(sc_link->flags, SDEV_READONLY)) {
device_unref(&sc->sc_dev);
- return (EROFS);
+ return (EACCES);
}
SC_DEBUG(sc_link, SDEV_DB1,