summaryrefslogtreecommitdiffstats
path: root/sys/cam/cam.c
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1998-09-22 04:53:23 +0000
committergibbs <gibbs@FreeBSD.org>1998-09-22 04:53:23 +0000
commit1221790ff3c9e4d8796ffb8a65902317562749f7 (patch)
tree171627c6a0e3efe262669d95f783002f29a14aa9 /sys/cam/cam.c
parentc50bd3ff4b3ab03e97d69d1280ea2132899b0362 (diff)
downloadFreeBSD-src-1221790ff3c9e4d8796ffb8a65902317562749f7.zip
FreeBSD-src-1221790ff3c9e4d8796ffb8a65902317562749f7.tar.gz
cam.c:
Clear up trailing NULs in cam_strvis. cam_xpt.c: Nuke an experimental quirk entry for the Toshiba 3401. The real problem with this device turned out to be a bug in the aic7xxx driver that was fixed months ago. Add a quirk entry to inhibit multiple lun scanning and serial number probing of DPT RAID volumes. My DPT controller hangs up solid when I do either of these things to a RAID 1 volume.
Diffstat (limited to 'sys/cam/cam.c')
-rw-r--r--sys/cam/cam.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/cam/cam.c b/sys/cam/cam.c
index 8be4568..4e11061 100644
--- a/sys/cam/cam.c
+++ b/sys/cam/cam.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: cam.c,v 1.1 1998/09/15 06:33:23 gibbs Exp $
*/
#include <sys/param.h>
@@ -35,10 +35,11 @@ void
cam_strvis(u_int8_t *dst, const u_int8_t *src, int srclen, int dstlen)
{
- /* Trim leading/trailing spaces. */
+ /* Trim leading/trailing spaces, nulls. */
while (srclen > 0 && src[0] == ' ')
src++, srclen--;
- while (srclen > 0 && src[srclen-1] == ' ')
+ while (srclen > 0
+ && (src[srclen-1] == ' ' || src[srclen-1] == '\0'))
srclen--;
while (srclen > 0 && dstlen > 1) {
OpenPOWER on IntegriCloud