Annotation of 43BSDTahoe/sys/tahoestand/vdformat/status.c, revision 1.1

1.1     ! root        1: #ifndef lint
        !             2: static char sccsid[] = "@(#)status.c   1.3 (Berkeley/CCI) 6/7/88";
        !             3: #endif
        !             4: 
        !             5: #include       "vdfmt.h"
        !             6: 
        !             7: /*
        !             8: **     These routines are used to display the status of the formatter.
        !             9: */
        !            10: 
        !            11: status()
        !            12: {
        !            13:        indent();
        !            14:        switch (cur.state) {
        !            15:                case cmd :
        !            16:                        print("Waiting for operator response.\n");
        !            17:                        break;
        !            18:                case fmt :
        !            19:                        dump_state("Formatting");
        !            20:                        break;
        !            21:                case vfy :
        !            22:                        dump_state("Verifying");
        !            23:                        break;
        !            24:                case rel :
        !            25:                        dump_state("Relocating");
        !            26:                        break;
        !            27:                case cor :
        !            28:                        dump_state("Correcting");
        !            29:                        break;
        !            30:                case inf :
        !            31:                        dump_state("Collecting information");
        !            32:                        break;
        !            33:                case exec :
        !            34:                        dump_state("Exercising disk");
        !            35:                        break;
        !            36:                case setup:
        !            37:                        printf("Initializing for operation ");
        !            38:                        printf("on controller %d, drive %d.\n",
        !            39:                                cur.controller, cur.drive);
        !            40:                default:
        !            41:                        print("Current state is unknown.\n");
        !            42:        }
        !            43:        exdent(1);
        !            44: }
        !            45: 
        !            46: 
        !            47: /*
        !            48: **
        !            49: */
        !            50: 
        !            51: dump_state(string)
        !            52: char   *string;
        !            53: {
        !            54:        extern int wait_for_char;
        !            55: 
        !            56:        indent();
        !            57:        print("%s on controller %d, drive %d.\n",
        !            58:            string, cur.controller, cur.drive);
        !            59:        if (wait_for_char)
        !            60:                print("Waiting for operator response.\n");
        !            61:        else {
        !            62:                print("Currently accessing cylinder %d, head %d.\n",
        !            63:                    cur.daddr.cylinder, cur.daddr.track);
        !            64:                print("Currently ");
        !            65:                switch (cur.substate) {
        !            66:                        case sub_chk :
        !            67:                                printf("determining drive state.\n");
        !            68:                                break;
        !            69:                        case sub_fmt :
        !            70:                                printf("formatting drive surface.\n");
        !            71:                                break;
        !            72:                        case sub_vfy :
        !            73:                                printf("verifying drive surface.\n");
        !            74:                                break;
        !            75:                        case sub_rel :
        !            76:                                printf("performing relocation operations.\n");
        !            77:                                break;
        !            78:                        case sub_rcvr :
        !            79:                                printf("recovering from hardware error.\n");
        !            80:                                break;
        !            81:                        case sub_wmap :
        !            82:                                printf("writing relocation map.\n");
        !            83:                                break;
        !            84:                        default :
        !            85:                                printf("I don't know what is happening.\n");
        !            86:                                break;
        !            87:                }
        !            88:        }
        !            89:        exdent(1);
        !            90: }
        !            91: 

unix.superglobalmegacorp.com

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