diff options
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r-- | sys/scsi/sd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index bb19ee0cd92..7e5570fb9b2 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.330 2021/10/24 16:57:30 mpi Exp $ */ +/* $OpenBSD: sd.c,v 1.331 2022/02/27 02:27:55 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -315,10 +315,6 @@ sdopen(dev_t dev, int flag, int fmt, struct proc *p) unit = DISKUNIT(dev); part = DISKPART(dev); - SC_DEBUG(link, SDEV_DB1, - ("sdopen: dev=0x%x (unit %d (of %d), partition %d)\n", dev, unit, - sd_cd.cd_ndevs, part)); - rawopen = (part == RAW_PART) && (fmt == S_IFCHR); sc = sdlookup(unit); @@ -330,6 +326,10 @@ sdopen(dev_t dev, int flag, int fmt, struct proc *p) } link = sc->sc_link; + SC_DEBUG(link, SDEV_DB1, + ("sdopen: dev=0x%x (unit %d (of %d), partition %d)\n", dev, unit, + sd_cd.cd_ndevs, part)); + if (ISSET(flag, FWRITE) && ISSET(link->flags, SDEV_READONLY)) { device_unref(&sc->sc_dev); return EACCES; |