Annotation of xinu/sys/ndump.c, revision 1.1.1.1

1.1       root        1: /* ndump.c - ndump */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: #include <io.h>
                      6: #include <name.h>
                      7: 
                      8: #define        PADTO   24
                      9: 
                     10: /*------------------------------------------------------------------------
                     11:  *  ndump  -  dump current mappings in object naming system
                     12:  *------------------------------------------------------------------------
                     13:  */
                     14: ndump()
                     15: {
                     16:        struct  nament  *nptr;
                     17:        int     i, len, dev;
                     18:        char    *p;
                     19: 
                     20:        for (i=0 ; i<Nam.nnames ; i++) {
                     21:                nptr = & Nam.nametab[i];
                     22:                kprintf("\"%-s\"", nptr->npre);
                     23:                for (len=strlen(nptr->npre) ; len < PADTO ; len++)
                     24:                        kprintf(" ");
                     25:                dev = nptr->ndev;
                     26:                if (isbaddev(dev))
                     27:                        p = "SYSERR";
                     28:                else
                     29:                        p = devtab[dev].dvname;
                     30:                kprintf(" -> (%-8s) \"%s\"\n", p, nptr->nrepl);
                     31:        }
                     32: }

unix.superglobalmegacorp.com

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