summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1999-09-18 22:48:29 +0000
committerJason Downs <downsj@cvs.openbsd.org>1999-09-18 22:48:29 +0000
commit1ab1979a901376d9a9c400d4b503c4a385048d93 (patch)
tree696cc2bb26bc116230cf423a4769c29ddbae3de3
parentc8dbfbdeba4c876992870ba9a9487a194cfdbdc4 (diff)
Fix device existance check.
-rw-r--r--sys/arch/hp300/dev/st.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/hp300/dev/st.c b/sys/arch/hp300/dev/st.c
index 1bd1e4a0d05..52f0d375855 100644
--- a/sys/arch/hp300/dev/st.c
+++ b/sys/arch/hp300/dev/st.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: st.c,v 1.10 1998/08/04 23:28:06 millert Exp $ */
+/* $OpenBSD: st.c,v 1.11 1999/09/18 22:48:28 downsj Exp $ */
/* $NetBSD: st.c,v 1.22 1997/04/02 22:37:38 scottr Exp $ */
/*
@@ -343,7 +343,7 @@ stopen(dev, flag, type, p)
{ CMD_MODE_SENSE, 0, 0, 0, sizeof(mode), 0 }
};
- if (UNIT(dev) > st_cd.cd_ndevs ||
+ if (UNIT(dev) >= st_cd.cd_ndevs ||
(sc = st_cd.cd_devs[UNIT(dev)]) == NULL ||
(sc->sc_flags & STF_ALIVE) == 0)
return (ENXIO);