summaryrefslogtreecommitdiffstats
path: root/sys/scsi/scsi_driver.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1995-12-05 04:41:20 +0000
committerjulian <julian@FreeBSD.org>1995-12-05 04:41:20 +0000
commit1b5d732ee331821e3d7e44e193a7ede5705095e5 (patch)
treed3429c441a7c79999cfe9ab514ea36abf084276d /sys/scsi/scsi_driver.c
parent8156a5707a8830d1ce5658e103e6780f22cfc8dd (diff)
downloadFreeBSD-src-1b5d732ee331821e3d7e44e193a7ede5705095e5.zip
FreeBSD-src-1b5d732ee331821e3d7e44e193a7ede5705095e5.tar.gz
If the open fails, don't mark the device as open (duh!)
symptom:.. once an open of a 'can only open it once' device fails.. you can never open it again, as it was marked open but wasn't open..
Diffstat (limited to 'sys/scsi/scsi_driver.c')
-rw-r--r--sys/scsi/scsi_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/scsi/scsi_driver.c b/sys/scsi/scsi_driver.c
index 23370a9..a49da2c 100644
--- a/sys/scsi/scsi_driver.c
+++ b/sys/scsi/scsi_driver.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scsi_driver.c,v 1.9 1995/05/03 18:09:11 dufault Exp $
+ * $Id: scsi_driver.c,v 1.10 1995/05/30 08:13:37 rgrimes Exp $
*
*/
#include <sys/types.h>
@@ -135,7 +135,7 @@ struct scsi_device *device)
else
errcode = (*device->dev_open)(dev, flags, fmt, p, sc_link);
- sc_link->flags |= SDEV_IS_OPEN;
+ if (!errcode ) sc_link->flags |= SDEV_IS_OPEN;
SC_DEBUG(sc_link, SDEV_DB1, ("%sopen: dev=0x%lx (unit %ld) result %d\n",
device->name, dev, unit, errcode));
OpenPOWER on IntegriCloud