From owner-svn-src-stable@FreeBSD.ORG Sun Jun 14 17:05:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F40AE106564A; Sun, 14 Jun 2009 17:05:54 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E19EC8FC0A; Sun, 14 Jun 2009 17:05:54 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5EH5sTs055023; Sun, 14 Jun 2009 17:05:54 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5EH5sHg055022; Sun, 14 Jun 2009 17:05:54 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200906141705.n5EH5sHg055022@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Jun 2009 17:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194200 - stable/7/bin/ps X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 17:05:55 -0000 Author: jilles Date: Sun Jun 14 17:05:54 2009 New Revision: 194200 URL: http://svn.freebsd.org/changeset/base/194200 Log: MFC r192688: fix nonsense in ps etime field for swapped out processes PR: bin/123069 Submitted by: Vladimir Kozbin Approved by: ed (mentor) Modified: stable/7/bin/ps/ (props changed) stable/7/bin/ps/print.c Modified: stable/7/bin/ps/print.c ============================================================================== --- stable/7/bin/ps/print.c Sun Jun 14 17:03:59 2009 (r194199) +++ stable/7/bin/ps/print.c Sun Jun 14 17:05:54 2009 (r194200) @@ -572,6 +572,10 @@ elapsed(KINFO *k, VARENT *ve) char obuff[128]; v = ve->var; + if (!k->ki_valid) { + (void)printf("%-*s", v->width, "-"); + return; + } val = now - k->ki_p->ki_start.tv_sec; days = val / (24 * 60 * 60); val %= 24 * 60 * 60;