xref: /original-bsd/sys/pmax/stand/conf.c (revision 94e7bb75)
1 /*
2  * Copyright (c) 1992 Regents of the University of California.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Ralph Campbell.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)conf.c	7.2 (Berkeley) 03/07/92
11  */
12 
13 #include "saio.h"
14 #include "../include/machMon.h"
15 
16 devread(io)
17 	register struct iob *io;
18 {
19 
20 	if (lseek(io->i_unit, (io->i_bn + io->i_boff) * DEV_BSIZE, 0) < 0)
21 		return (-1);
22 	return (read(io->i_unit, io->i_ma, io->i_cc));
23 }
24 
25 #ifndef SMALL
26 devwrite(io)
27 	register struct iob *io;
28 {
29 
30 	if (lseek(io->i_unit, (io->i_bn + io->i_boff) * DEV_BSIZE, 0) < 0)
31 		return (-1);
32 	return (write(io->i_unit, io->i_ma, io->i_cc));
33 }
34 #endif
35