Ignore tilde in ut_line
This commit is contained in:
parent
918269e057
commit
eddb6d39a5
3
who.c
3
who.c
@ -33,7 +33,8 @@ main(int argc, char **argv)
|
||||
eprintf("fopen:");
|
||||
}
|
||||
while(fread(&usr, sizeof(usr), 1, ufp) == 1) {
|
||||
if (!*usr.ut_name || !*usr.ut_line)
|
||||
if (!*usr.ut_name || !*usr.ut_line ||
|
||||
usr.ut_line[0] == '~')
|
||||
continue;
|
||||
if (mflag && strcmp(usr.ut_line,
|
||||
strrchr(ttyname(STDIN_FILENO), '/') + 1))
|
||||
|
Loading…
Reference in New Issue
Block a user