|
|
1.1 root 1: #include "vdfmt.h"
2:
3: /*
4: ** These routines are used to display the status of the formatter.
5: */
6:
7: status()
8: {
9: indent();
10: switch (cur.state) {
11: case cmd :
12: print("Waiting for operator response.\n");
13: break;
14: case fmt :
15: dump_state("Formatting");
16: break;
17: case vfy :
18: dump_state("Verifying");
19: break;
20: case rel :
21: dump_state("Relocating");
22: break;
23: case cor :
24: dump_state("Correcting");
25: break;
26: case inf :
27: dump_state("Collecting information");
28: break;
29: case exec :
30: dump_state("Exercising disk");
31: break;
32: default:
33: print("Current state is unknown.\n");
34: }
35: exdent(1);
36: }
37:
38:
39: /*
40: **
41: */
42:
43: dump_state(string)
44: char *string;
45: {
46: indent();
47: print("%s on controller %d, drive %d.\n",
48: string, cur.controller, cur.drive);
49: print("Currently accessing cylinder %d, head %d.\n",
50: cur.daddr.cylinder, cur.daddr.track);
51: print("Currently ");
52: switch (cur.substate) {
53: case sub_chk :
54: printf("determining drive state.\n");
55: break;
56: case sub_fmt :
57: printf("formatting drive surface.\n");
58: break;
59: case sub_vfy :
60: printf("verifying drive surface.\n");
61: break;
62: case sub_rel :
63: printf("performing relocation operations.\n");
64: break;
65: case sub_rcvr :
66: printf("recovering from hardware error.\n");
67: break;
68: default :
69: printf("I don't know what is happening.\n");
70: break;
71: }
72: exdent(1);
73: }
74:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.