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

1.1       root        1: /* x_who.c - x_who */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: #include <date.h>
                      6: #include <shell.h>
                      7: 
                      8: /*------------------------------------------------------------------------
                      9:  *  x_who  -  (command who) print name user is logged in under
                     10:  *------------------------------------------------------------------------
                     11:  */
                     12: COMMAND        x_who(stdin, stdout, stderr)
                     13: int    stdin, stdout, stderr;
                     14: {
                     15:        char    machine[32];
                     16:        char    str[80];
                     17: 
                     18:        if (marked(Shl.shmark) && Shl.shused) {
                     19:                getname(machine);
                     20:                sprintf(str, "%10s!%-10s Console : ", machine, Shl.shuser);
                     21:                write(stdout, str, strlen(str));
                     22:                ascdate(ut2ltim(Shl.shlogon), str);
                     23:                strcat(str, "\n");
                     24:                write(stdout, str, strlen(str));
                     25:        }
                     26:        return(OK);
                     27: }

unix.superglobalmegacorp.com

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