>From ee914584f00e32d7e63203fac76a549ba462a2ee Mon Sep 17 00:00:00 2001
From: sin <s...@2f30.org>
Date: Mon, 5 Aug 2013 16:12:01 +0100
Subject: [PATCH] Ignore tilde in ut_line

---
 who.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/who.c b/who.c
index aee4f76..ec4accc 100644
--- a/who.c
+++ b/who.c
@@ -38,6 +38,8 @@ main(int argc, char **argv)
                if (mflag && strcmp(usr.ut_line,
                                    strrchr(ttyname(0), '/') + 1))
                        continue;
+               if (usr.ut_line[0] == '~')
+                       continue;
                t = usr.ut_time;
                strftime(timebuf, sizeof timebuf, "%Y-%m-%d %H:%M", 
localtime(&t));
                printf("%-8s %-12s %-16s\n", usr.ut_name, usr.ut_line, timebuf);
-- 
1.8.2.3

Reply via email to