diff options
author | phk <phk@FreeBSD.org> | 1999-05-07 10:11:40 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-05-07 10:11:40 +0000 |
commit | 693dd58bb3e5843d252e25a15e2cc8d49323cb82 (patch) | |
tree | a0fbea49edf11184c1bafaed7d5b3cd858742449 /sys/vm/vm_swap.c | |
parent | cfcd3ae08c30d66088e1ad5ffa68aa05b60e1bfe (diff) | |
download | FreeBSD-src-693dd58bb3e5843d252e25a15e2cc8d49323cb82.zip FreeBSD-src-693dd58bb3e5843d252e25a15e2cc8d49323cb82.tar.gz |
Continue where Julian left off in July 1998:
Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline)
function.
Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention
to the order of the cmaj/bmaj arguments!)
Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE
(ditto!)
(Next step will be to convert all bdev dev_t's to cdev dev_t's
before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
Diffstat (limited to 'sys/vm/vm_swap.c')
-rw-r--r-- | sys/vm/vm_swap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c index 0f3ad71..9a8db05 100644 --- a/sys/vm/vm_swap.c +++ b/sys/vm/vm_swap.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vm_swap.c 8.5 (Berkeley) 2/17/94 - * $Id: vm_swap.c,v 1.63 1999/04/28 10:54:24 dt Exp $ + * $Id: vm_swap.c,v 1.64 1999/05/07 07:03:47 phk Exp $ */ #include "opt_devfs.h" @@ -209,7 +209,7 @@ swapon(p, uap) switch (vp->v_type) { case VBLK: dev = vp->v_rdev; - if (major(dev) >= nblkdev || bdevsw[major(dev)] == NULL) { + if (major(dev) >= nblkdev || bdevsw(major(dev)) == NULL) { error = ENXIO; break; } @@ -281,8 +281,8 @@ swaponvp(p, vp, dev, nblks) if (error) return (error); - if (nblks == 0 && dev != NODEV && (bdevsw[major(dev)]->d_psize == 0 || - (nblks = (*bdevsw[major(dev)]->d_psize) (dev)) == -1)) { + if (nblks == 0 && dev != NODEV && (bdevsw(major(dev))->d_psize == 0 || + (nblks = (*bdevsw(major(dev))->d_psize) (dev)) == -1)) { (void) VOP_CLOSE(vp, FREAD | FWRITE, p->p_ucred, p); return (ENXIO); } |