diff options
author | mjacob <mjacob@FreeBSD.org> | 1999-12-30 02:32:13 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 1999-12-30 02:32:13 +0000 |
commit | 48829a5d6b8a2d298f31a3d298c809338e2dfb1a (patch) | |
tree | dc625ee612f905a9ec03af3e0fdd860439699f6a /sys/cam/scsi | |
parent | 5d6d63f1198ed500d9ba3fd2a94cf49d48763b5a (diff) | |
download | FreeBSD-src-48829a5d6b8a2d298f31a3d298c809338e2dfb1a.zip FreeBSD-src-48829a5d6b8a2d298f31a3d298c809338e2dfb1a.tar.gz |
Change error message make sense and add a missing
periph_release on a failed open so that the periph
dtor for it will get called when we deallocate the
instance from targioctl.
Diffstat (limited to 'sys/cam/scsi')
-rw-r--r-- | sys/cam/scsi/scsi_target.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index f5f577f..85e45dd 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -296,7 +296,7 @@ targenlun(struct cam_periph *periph) status = immed_ccb.ccb_h.status; if (status != CAM_REQ_CMP) { xpt_print_path(periph->path); - printf("targenlun - Enable Lun Rejected for status 0x%x\n", + printf("targenlun - Enable Lun Rejected with status 0x%x\n", status); return (status); } @@ -580,6 +580,9 @@ targopen(dev_t dev, int flags, int fmt, struct proc *p) break; } cam_periph_unlock(periph); + if (error) { + cam_periph_release(periph); + } return (error); } |