From 751509f13e30c8c0c2bd27088c7a5965b49b452c Mon Sep 17 00:00:00 2001 From: Bill Joy Date: Sat, 1 Nov 1980 22:54:39 -0800 Subject: [PATCH] Have who reflect identity of the system. SCCS-vsn: usr.bin/who/who.c 4.2 --- usr/src/usr.bin/who/who.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr/src/usr.bin/who/who.c b/usr/src/usr.bin/who/who.c index 5a0f0c759a..4d65cc2447 100644 --- a/usr/src/usr.bin/who/who.c +++ b/usr/src/usr.bin/who/who.c @@ -1,4 +1,4 @@ -static char *sccsid = "@(#)who.c 4.1 (Berkeley) %G%"; +static char *sccsid = "@(#)who.c 4.2 (Berkeley) %G%"; /* * who */ @@ -6,6 +6,8 @@ static char *sccsid = "@(#)who.c 4.1 (Berkeley) %G%"; #include #include #include +#include +#include #define NMAX sizeof(utmp.ut_name) #define LMAX sizeof(utmp.ut_line) @@ -45,11 +47,12 @@ char **argv; } while (fread((char *)&utmp, sizeof(utmp), 1, fi) == 1) { if(argc==3) { + static char myname[]=sysname; if (strcmp(utmp.ut_line, tp)) continue; -#ifdef vax - printf("(Vax) "); -#endif + if (islower(*myname)) + *myname = toupper(*myname); + printf("(%s) ",myname); putline(); exit(0); } -- 2.20.1