From owner-p4-projects Mon Aug 26 16:45:30 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D6AA937B401; Mon, 26 Aug 2002 16:45:24 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D49137B400 for ; Mon, 26 Aug 2002 16:45:24 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00DBA43E4A for ; Mon, 26 Aug 2002 16:45:24 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7QNjNJU049706 for ; Mon, 26 Aug 2002 16:45:23 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7QNjNm0049703 for perforce@freebsd.org; Mon, 26 Aug 2002 16:45:23 -0700 (PDT) Date: Mon, 26 Aug 2002 16:45:23 -0700 (PDT) Message-Id: <200208262345.g7QNjNm0049703@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 16616 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=16616 Change 16616 by peter@peter_daintree on 2002/08/26 16:45:18 patch up some abuse of ut_time Affected files ... .. //depot/projects/ia64/usr.bin/who/who.c#8 edit Differences ... ==== //depot/projects/ia64/usr.bin/who/who.c#8 (text+ko) ==== @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -160,7 +161,7 @@ { char buf[80], tty[sizeof(_PATH_DEV) + UT_LINESIZE]; struct stat sb; - time_t idle; + time_t idle, t; static int d_first = -1; struct tm *tm; char state; @@ -184,7 +185,8 @@ if (Tflag) printf("%c ", state); printf("%-*.*s ", UT_LINESIZE, UT_LINESIZE, ut->ut_line); - tm = localtime(&ut->ut_time); + t = _time32_to_time(ut->ut_time); + tm = localtime(&t); strftime(buf, sizeof(buf), d_first ? "%e %b %R" : "%b %e %R", tm); printf("%-*s ", 12, buf); if (uflag) { @@ -265,7 +267,7 @@ name = "?"; strncpy(ut.ut_name, name, UT_NAMESIZE); strncpy(ut.ut_line, tty, UT_LINESIZE); - time(&ut.ut_time); + ut.ut_time = _time_to_time32(time(NULL)); row(&ut); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message