Added drum device.
Submitted by: partly by "Marc G. Fournier" <scrappy@ki.net>
This commit is contained in:
parent
9120a859f5
commit
5ea390eff5
@ -31,7 +31,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)vm_swap.c 8.5 (Berkeley) 2/17/94
|
* @(#)vm_swap.c 8.5 (Berkeley) 2/17/94
|
||||||
* $Id: vm_swap.c,v 1.34 1995/12/21 20:09:46 julian Exp $
|
* $Id: vm_swap.c,v 1.35 1996/03/03 21:11:08 dyson Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -39,6 +39,9 @@
|
|||||||
#include <sys/sysproto.h>
|
#include <sys/sysproto.h>
|
||||||
#include <sys/buf.h>
|
#include <sys/buf.h>
|
||||||
#include <sys/conf.h>
|
#include <sys/conf.h>
|
||||||
|
#ifdef DEVFS
|
||||||
|
#include <sys/devfsext.h>
|
||||||
|
#endif
|
||||||
#include <sys/proc.h>
|
#include <sys/proc.h>
|
||||||
#include <sys/namei.h>
|
#include <sys/namei.h>
|
||||||
#include <sys/dmap.h> /* XXX */
|
#include <sys/dmap.h> /* XXX */
|
||||||
@ -286,6 +289,9 @@ swaponvp(p, vp, dev, nblks)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static sw_devsw_installed = 0;
|
static sw_devsw_installed = 0;
|
||||||
|
#ifdef DEVFS
|
||||||
|
static void *drum_devfs_token;
|
||||||
|
#endif
|
||||||
|
|
||||||
static void sw_drvinit(void *unused)
|
static void sw_drvinit(void *unused)
|
||||||
{
|
{
|
||||||
@ -297,6 +303,11 @@ static void sw_drvinit(void *unused)
|
|||||||
dev = makedev(BDEV_MAJOR,0);
|
dev = makedev(BDEV_MAJOR,0);
|
||||||
bdevsw_add(&dev,&sw_bdevsw,NULL);
|
bdevsw_add(&dev,&sw_bdevsw,NULL);
|
||||||
sw_devsw_installed = 1;
|
sw_devsw_installed = 1;
|
||||||
|
#ifdef DEVFS
|
||||||
|
drum_devfs_token = devfs_add_devswf(&sw_cdevsw, 0, DV_CHR,
|
||||||
|
UID_ROOT, GID_KMEM, 0640,
|
||||||
|
"drum");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user