summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-03-30 02:40:43 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-03-30 02:40:43 +0000
commitfa57b28afee7b1238e984288ab141285339e0b07 (patch)
tree19c13ff9b3d055cacecda09e60eedc0a81d1e91d /sys/scsi
parentd5d7afd9b47c9c7ceec46f3fdbfda3bb9a9d68e7 (diff)
Comment typo, minor knf. No code change.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/cd.c16
-rw-r--r--sys/scsi/sd.c27
2 files changed, 21 insertions, 22 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 3ae2fece138..c736bf4d940 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.75 2004/05/09 04:01:59 krw Exp $ */
+/* $OpenBSD: cd.c,v 1.76 2005/03/30 02:40:42 krw Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -327,7 +327,7 @@ cdopen(dev, flag, fmt, p)
unit = CDUNIT(dev);
cd = cdlookup(unit);
if (cd == NULL)
- return ENXIO;
+ return (ENXIO);
sc_link = cd->sc_link;
@@ -337,7 +337,7 @@ cdopen(dev, flag, fmt, p)
if ((error = cdlock(cd)) != 0) {
device_unref(&cd->sc_dev);
- return error;
+ return (error);
}
part = CDPART(dev);
@@ -355,9 +355,9 @@ cdopen(dev, flag, fmt, p)
}
} else {
/*
- * Check that it is still responding and ok.
- * Drive can be in progress of loading media so use
- * increased retries number and don't ignore NOT_READY.
+ * Check that it is still responding and ok. Drive can be in
+ * progress of loading media so use increased retries number
+ * and don't ignore NOT_READY.
*/
error = scsi_test_unit_ready(sc_link, TEST_READY_RETRIES_CD,
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE);
@@ -427,7 +427,7 @@ out: /* Insure only one open at a time. */
SC_DEBUG(sc_link, SDEV_DB3, ("open complete\n"));
cdunlock(cd);
device_unref(&cd->sc_dev);
- return 0;
+ return (0);
bad2:
sc_link->flags &= ~SDEV_MEDIA_LOADED;
@@ -442,7 +442,7 @@ bad:
bad3:
cdunlock(cd);
device_unref(&cd->sc_dev);
- return error;
+ return (error);
}
/*
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 8378bdb8ecb..ec0be13fc92 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.72 2005/03/25 05:07:43 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.73 2005/03/30 02:40:42 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -350,7 +350,7 @@ sdzeroref(self)
}
/*
- * open the device. Make sure the partition info is a up-to-date as can be.
+ * Open the device. Make sure the partition info is as up-to-date as can be.
*/
int
sdopen(dev, flag, fmt, p)
@@ -366,7 +366,7 @@ sdopen(dev, flag, fmt, p)
unit = SDUNIT(dev);
sd = sdlookup(unit);
if (sd == NULL)
- return ENXIO;
+ return (ENXIO);
sc_link = sd->sc_link;
part = SDPART(dev);
@@ -377,7 +377,7 @@ sdopen(dev, flag, fmt, p)
if ((error = sdlock(sd)) != 0) {
device_unref(&sd->sc_dev);
- return error;
+ return (error);
}
if (sd->sc_dk.dk_openmask != 0) {
@@ -392,8 +392,7 @@ sdopen(dev, flag, fmt, p)
} else {
/* Check that it is still responding and ok. */
error = scsi_test_unit_ready(sc_link,
- TEST_READY_RETRIES_DEFAULT,
- SCSI_IGNORE_ILLEGAL_REQUEST |
+ TEST_READY_RETRIES_DEFAULT, SCSI_IGNORE_ILLEGAL_REQUEST |
SCSI_IGNORE_MEDIA_CHANGE);
/* Try to start the unit if it wasn't ready. */
@@ -411,7 +410,7 @@ sdopen(dev, flag, fmt, p)
if ((sc_link->flags & SDEV_REMOVABLE) != 0) {
error = scsi_prevent(sc_link, PR_PREVENT,
SCSI_IGNORE_ILLEGAL_REQUEST |
- SCSI_IGNORE_MEDIA_CHANGE);
+ SCSI_IGNORE_MEDIA_CHANGE);
if (error)
goto bad;
}
@@ -456,24 +455,24 @@ sdopen(dev, flag, fmt, p)
SC_DEBUG(sc_link, SDEV_DB3, ("open complete\n"));
sdunlock(sd);
device_unref(&sd->sc_dev);
- return 0;
+ return (0);
bad2:
sc_link->flags &= ~SDEV_MEDIA_LOADED;
bad:
if (sd->sc_dk.dk_openmask == 0) {
- if ((sd->sc_link->flags & SDEV_REMOVABLE) != 0)
- scsi_prevent(sc_link, PR_ALLOW,
- SCSI_IGNORE_ILLEGAL_REQUEST |
- SCSI_IGNORE_MEDIA_CHANGE);
- sc_link->flags &= ~SDEV_OPEN;
+ if ((sd->sc_link->flags & SDEV_REMOVABLE) != 0)
+ scsi_prevent(sc_link, PR_ALLOW,
+ SCSI_IGNORE_ILLEGAL_REQUEST |
+ SCSI_IGNORE_MEDIA_CHANGE);
+ sc_link->flags &= ~SDEV_OPEN;
}
bad3:
sdunlock(sd);
device_unref(&sd->sc_dev);
- return error;
+ return (error);
}
/*