File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / sys / stand / vdfmt / status.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:29:50 2019 UTC (6 years, 11 months ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

#include	"vdfmt.h"

/*
**	These routines are used to display the status of the formatter.
*/

status()
{
	indent();
	switch (cur.state) {
		case cmd :
			print("Waiting for operator response.\n");
			break;
		case fmt :
			dump_state("Formatting");
			break;
		case vfy :
			dump_state("Verifying");
			break;
		case rel :
			dump_state("Relocating");
			break;
		case cor :
			dump_state("Correcting");
			break;
		case inf :
			dump_state("Collecting information");
			break;
		case exec :
			dump_state("Exercising disk");
			break;
		default:
			print("Current state is unknown.\n");
	}
	exdent(1);
}


/*
**
*/

dump_state(string)
char	*string;
{
	indent();
	print("%s on controller %d, drive %d.\n",
	    string, cur.controller, cur.drive);
	print("Currently accessing cylinder %d, head %d.\n",
	    cur.daddr.cylinder, cur.daddr.track);
	print("Currently ");
	switch (cur.substate) {
		case sub_chk :
			printf("determining drive state.\n");
			break;
		case sub_fmt :
			printf("formatting drive surface.\n");
			break;
		case sub_vfy :
			printf("verifying drive surface.\n");
			break;
		case sub_rel :
			printf("performing relocation operations.\n");
			break;
		case sub_rcvr :
			printf("recovering from hardware error.\n");
			break;
		default :
			printf("I don't know what is happening.\n");
			break;
	}
	exdent(1);
}


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.