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