/*	conf.c	4.9	81/12/01	*/

#include "../h/param.h"
#include "../h/inode.h"
#include "../h/pte.h"
#include "../h/mbareg.h"
#include "saio.h"

devread(io)
	register struct iob *io;
{

	return( (*devsw[io->i_ino.i_dev].dv_strategy)(io, READ) );
}

devwrite(io)
	register struct iob *io;
{

	return( (*devsw[io->i_ino.i_dev].dv_strategy)(io, WRITE) );
}

devopen(io)
	register struct iob *io;
{

	(*devsw[io->i_ino.i_dev].dv_open)(io);
}

devclose(io)
	register struct iob *io;
{

	(*devsw[io->i_ino.i_dev].dv_close)(io);
}

nullsys()
{

	;
}

int	nullsys();
int	hpstrategy(), hpopen();
int	upstrategy(), upopen();
int	rkstrategy(), rkopen();
int	udstrategy(), udopen();
#ifndef BOOT
int	htstrategy(), htopen(), htclose();
int	tmstrategy(), tmopen(), tmclose();
int	tsstrategy(), tsopen(), tsclose();
int	mtstrategy(), mtopen(), mtclose();
#endif

struct devsw devsw[] = {
	"hp",	hpstrategy,	hpopen,		nullsys,
	"up",	upstrategy,	upopen,		nullsys,
	"hk",	rkstrategy,	rkopen,		nullsys,
	"ra",	udstrategy,	udopen,		nullsys,
#ifndef BOOT
	"ht",	htstrategy,	htopen,		htclose,
	"tm",	tmstrategy,	tmopen,		tmclose,
	"ts",	tsstrategy,	tsopen,		tsclose,
	"mt",	mtstrategy,	mtopen,		mtclose,
#endif
	0,0,0,0
};
