Annotation of xinu/sys/shell/x_devs.c, revision 1.1.1.1

1.1       root        1: /* x_devs.c - x_devs */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: 
                      6: LOCAL  char hd1[] =
                      7:        "Num  Device   minor    CSR    i-vect.  o-vect.  cntrl blk\n";
                      8: LOCAL  char hd2[] =
                      9:        "--- --------  ----- -------- -------- -------- ----------\n";
                     10: 
                     11: /*------------------------------------------------------------------------
                     12:  *  x_devs  -  (command devs) print main fields of device switch table
                     13:  *------------------------------------------------------------------------
                     14:  */
                     15: COMMAND        x_devs(stdin, stdout, stderr, nargs, args)
                     16: int    stdin, stdout, stderr, nargs;
                     17: char   *args[];
                     18: {
                     19:        struct  devsw   *devptr;
                     20:        char    str[60];
                     21:        int     i;
                     22: 
                     23:        write (stdout, hd1, strlen(hd1) );
                     24:        write (stdout, hd2, strlen(hd2) );
                     25:        for (i=0 ; i<NDEVS ; i++) {
                     26:                devptr = &devtab[i];
                     27:                sprintf(str, "%2d. %-9s %3d   %08x %08x %08x  %08x\n",
                     28:                        i, devptr->dvname, devptr->dvminor,
                     29:                        devptr->dvcsr, devptr->dvivec, devptr->dvovec,
                     30:                        devptr->dvioblk);
                     31:                write(stdout, str, strlen(str));
                     32:        }
                     33: }

unix.superglobalmegacorp.com

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