summaryrefslogtreecommitdiffstats
path: root/sys/dev/ccd
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1998-02-15 08:14:39 +0000
committerjkh <jkh@FreeBSD.org>1998-02-15 08:14:39 +0000
commit3923d0f80a072be735c79e03cbb57c629999d106 (patch)
treeae12aac89a9905f1f8f86b0d597b38bb7149e053 /sys/dev/ccd
parent6a55e98a3375720a7bab47be7362b0bbcce3bc55 (diff)
downloadFreeBSD-src-3923d0f80a072be735c79e03cbb57c629999d106.zip
FreeBSD-src-3923d0f80a072be735c79e03cbb57c629999d106.tar.gz
missing spl() call and off by one error in the handling of the partitions.
Submitted by: Chris Csanady <ccsanady@friley585.res.iastate.edu> Obtained from: OpenBSD
Diffstat (limited to 'sys/dev/ccd')
-rw-r--r--sys/dev/ccd/ccd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index bbd3871..5ec5f3d 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -1,4 +1,4 @@
-/* $Id: ccd.c,v 1.27 1997/11/18 14:39:04 phk Exp $ */
+/* $Id: ccd.c,v 1.28 1998/01/31 03:19:06 eivind Exp $ */
/* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */
@@ -631,7 +631,7 @@ ccdopen(dev, flags, fmt, p)
ccdgetdisklabel(dev);
/* Check that the partition exists. */
- if (part != RAW_PART && ((part > lp->d_npartitions) ||
+ if (part != RAW_PART && ((part >= lp->d_npartitions) ||
(lp->d_partitions[part].p_fstype == FS_UNUSED))) {
error = ENXIO;
goto done;
@@ -938,6 +938,7 @@ ccdintr(cs, bp)
register struct buf *bp;
{
+ s = splbio();
#ifdef DEBUG
if (ccddebug & CCDB_FOLLOW)
printf("ccdintr(%x, %x)\n", cs, bp);
OpenPOWER on IntegriCloud