Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 May 2009 15:40:02 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/123069: commit references a PR
Message-ID:  <200905241540.n4OFe2G7075349@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/123069; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/123069: commit references a PR
Date: Sun, 24 May 2009 15:32:48 +0000 (UTC)

 Author: jilles
 Date: Sun May 24 15:32:34 2009
 New Revision: 192688
 URL: http://svn.freebsd.org/changeset/base/192688
 
 Log:
   Fix elapsed (etime) field for swapped out processes in ps:
   show '-' instead of time since the Epoch.
   
   PR:		bin/123069
   Submitted by:	Vladimir Kozbin
   Approved by:	ed (mentor)
   MFC after:	3 weeks
 
 Modified:
   head/bin/ps/print.c
 
 Modified: head/bin/ps/print.c
 ==============================================================================
 --- head/bin/ps/print.c	Sun May 24 15:27:25 2009	(r192687)
 +++ head/bin/ps/print.c	Sun May 24 15:32:34 2009	(r192688)
 @@ -596,6 +596,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;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905241540.n4OFe2G7075349>