xref: /csrg-svn/sys/tahoe/stand/vdformat/start.c (revision 32662)
129537Ssam #ifndef lint
2*32662Skarels static char sccsid[] = "@(#)start.c	1.3 (Berkeley/CCI) 11/23/87";
329537Ssam #endif
429537Ssam 
529537Ssam #include	"vdfmt.h"
629537Ssam 
729537Ssam /*
829537Ssam **
929537Ssam */
1029537Ssam 
start_commands()1129537Ssam start_commands()
1229537Ssam {
1329537Ssam 	register int	ctlr, drive, cur_op;
1429537Ssam 
1529537Ssam 	indent();
1629537Ssam 	for(ctlr=0; ctlr<MAXCTLR; ctlr++)
1729537Ssam 		for(drive=0; drive<MAXDRIVE; drive++) {
1829537Ssam 			for(cur_op=0; cur_op<NUMOPS; cur_op++) {
1929537Ssam 				if(ops_to_do[ctlr][drive].op & (1<<cur_op)) {
2029537Ssam 					cur.controller = ctlr;
2129537Ssam 					cur.drive = drive;
22*32662Skarels 					C_INFO = &c_info[ctlr];
23*32662Skarels 					D_INFO = &d_info[ctlr][drive];
24*32662Skarels 					lab = &D_INFO->label;
2529537Ssam 					if(!_setjmp(abort_environ)) {
2629981Skarels 						cur.state = setup;
2729537Ssam 						load_verify_patterns();
28*32662Skarels 						if (D_INFO->alive != u_true)
29*32662Skarels 							spin_up_drive();
3029537Ssam 						(*operations[cur_op].routine)();
3129537Ssam 					}
3229537Ssam 					ops_to_do[ctlr][drive].op&=~(1<<cur_op);
3329537Ssam 				}
3429537Ssam 			}
3529537Ssam 		}
3629537Ssam 	exdent(1);
3729537Ssam }
38