|
|
1.1 ! root 1: #ifndef lint ! 2: static char sccsid[] = "@(#)exercise.c 1.3 (Berkeley/CCI) 11/23/87"; ! 3: #endif ! 4: ! 5: #include "vdfmt.h" ! 6: ! 7: #define verbose 1 ! 8: ! 9: /* ! 10: ** ! 11: */ ! 12: ! 13: exercise() ! 14: { ! 15: int cyl, trk; ! 16: dskadr ead, sad; ! 17: ! 18: print("Starting disk exercise on "); ! 19: printf("controller %d, drive %d, ", cur.controller, cur.drive); ! 20: printf("type %s.\n", lab->d_typename); ! 21: ! 22: if(read_bad_sector_map() == true) { ! 23: if(bad_map->bs_id != D_INFO->id) { ! 24: print("Module serial numbers do not match!\n"); ! 25: print("Use `info' to find the real serial number.\n"); ! 26: _longjmp(abort_environ, 1); ! 27: } ! 28: } ! 29: else if(is_formatted() == false) { ! 30: print("Can not exercise unformatted drives!\n"); ! 31: _longjmp(abort_environ, 1); ! 32: } ! 33: print("Starting read test.\n"); ! 34: cur.state = exec; ! 35: sad.track = sad.sector = 0; ! 36: indent(); ! 37: for(sad.cylinder=0; sad.cylinder<lab->d_ncylinders; sad.cylinder++) { ! 38: print("pass %d...\n", sad.cylinder); ! 39: for(cyl=0; cyl<lab->d_ncylinders-NUMSYS; cyl++){ ! 40: ead.cylinder = cyl; ! 41: for(trk=0; trk<lab->d_ntracks; trk++) { ! 42: ead.track = trk; ! 43: ead.sector = 0; ! 44: access_dsk((char *)scratch, &sad, ! 45: VDOP_SEEK, 1, 1); ! 46: verify_track(&ead, 16, verbose); ! 47: if(kill_processes == true) ! 48: goto exit; ! 49: } ! 50: } ! 51: } ! 52: exdent(2); ! 53: exit: sync_bad_sector_map(); ! 54: printf("Exercise completed successfully.\n"); ! 55: } ! 56:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.