#include <sys/param.h>
#include <sys/inode.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	dskstrategy();
int	d40strategy();
int	nullsys();
int	mtstrategy(), mtopen(), mtclose();
int     d67strategy();
int     d256strategy();

struct devsw devsw[] {
	"dsk",  dskstrategy,    nullsys,        nullsys,        F_BLK,
	"d10",	dskstrategy,	nullsys,	nullsys,	F_BLK,
	"mt",   mtstrategy,     mtopen,         mtclose,        0,
	"msm",	d67strategy,	nullsys,	nullsys,	F_BLK,
	"d67",  d67strategy,    nullsys,        nullsys,        F_BLK,
	"d256", d256strategy,   nullsys,        nullsys,        F_BLK,
	"d40", d40strategy,	nullsys,	nullsys,	F_BLK,
	0,0,0,0,0
};
