Annotation of xinu/sys/shell/x_rf.c, revision 1.1

1.1     ! root        1: /* x_rf.c - x_rf */
        !             2: 
        !             3: #include <conf.h>
        !             4: #include <kernel.h>
        !             5: #include <fserver.h>
        !             6: #include <rfile.h>
        !             7: 
        !             8: /*------------------------------------------------------------------------
        !             9:  *  x_rf  -  (command rf) format and print remote file status
        !            10:  *------------------------------------------------------------------------
        !            11:  */
        !            12: COMMAND        x_rf(stdin, stdout, stderr, nargs, args)
        !            13: int    stdin, stdout, stderr, nargs;
        !            14: char   *args[];
        !            15: {
        !            16:        struct  rfblk   *rfptr;
        !            17:        char    str[80];
        !            18:        int     i;
        !            19: 
        !            20:        sprintf(str, "Remote files: server on dev=%d, server mutex=%d\n",
        !            21:                        Rf.device, Rf.rmutex);
        !            22:        write(stdout, str, strlen(str));
        !            23:        for (i=0 ; i<Nrf; i++) {
        !            24:                if ((rfptr = &Rf.rftab[i])->rf_state == RFREE)
        !            25:                        continue;
        !            26:                sprintf(str,
        !            27:                        " %2d. name=%-20s, pos=%6D, mode=%03o, sem=%d\n",
        !            28:                                rfptr->rf_dnum, rfptr->rf_name,
        !            29:                                rfptr->rf_pos,  rfptr->rf_mode,
        !            30:                                rfptr->rf_mutex);
        !            31:                write(stdout, str, strlen(str));
        !            32:        }
        !            33:        return(OK);
        !            34: }

unix.superglobalmegacorp.com

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