d9d3968546bea056afa597c00f631a6202971bc9
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
* %sccs.include.redist.c%
* @(#)dev.c 7.16 (Berkeley) %G%
#include <stand.att/saio.h>
* NB: the value "io->i_dev", used to offset the devsw[] array in the
* routines below, is munged by the machine specific stand Makefiles
* to work for certain boots.
cc
= (*devsw
[io
->i_dev
].dv_strategy
)(io
, F_READ
);
io
->i_flgs
&= ~F_TYPEMASK
;
cc
= (*devsw
[io
->i_dev
].dv_strategy
)(io
, F_WRITE
);
io
->i_flgs
&= ~F_TYPEMASK
;
if (!(ret
= (*devsw
[io
->i_dev
].dv_open
)(io
)))
printf("%s(%d,%d,%d,%d): ", devsw
[io
->i_dev
].dv_name
,
io
->i_adapt
, io
->i_ctlr
, io
->i_unit
, io
->i_part
);
break; /* already reported */
printf("bad adaptor number\n");
printf("bad controller number\n");
printf("bad drive number\n");
printf("bad partition\n");
printf("can't read disk label\n");
printf("bad device specification\n");
printf("unknown open error\n");
(*devsw
[io
->i_dev
].dv_close
)(io
);
return ((*devsw
[io
->i_dev
].dv_ioctl
)(io
, cmd
, arg
));