svn commit: r231107 - stable/8/usr.bin/vmstat

Ed Maste emaste at FreeBSD.org
Tue Feb 7 03:15:12 UTC 2012


Author: emaste
Date: Tue Feb  7 03:15:12 2012
New Revision: 231107
URL: http://svn.freebsd.org/changeset/base/231107

Log:
  MFC r219708:
  
    Reemove uptime validity check that hasn't been necessary since r151417
    switched to clock_gettime.  vmstat will now not exit with an error
    if run on a system with 10 years of uptime.

Modified:
  stable/8/usr.bin/vmstat/vmstat.c
Directory Properties:
  stable/8/usr.bin/vmstat/   (props changed)

Modified: stable/8/usr.bin/vmstat/vmstat.c
==============================================================================
--- stable/8/usr.bin/vmstat/vmstat.c	Tue Feb  7 02:57:36 2012	(r231106)
+++ stable/8/usr.bin/vmstat/vmstat.c	Tue Feb  7 03:15:12 2012	(r231107)
@@ -408,14 +408,10 @@ static long
 getuptime(void)
 {
 	struct timespec sp;
-	time_t uptime;
 
 	(void)clock_gettime(CLOCK_MONOTONIC, &sp);
-	uptime = sp.tv_sec;
-	if (uptime <= 0 || uptime > 60*60*24*365*10)
-		errx(1, "time makes no sense; namelist must be wrong");
 
-	return(uptime);
+	return(sp.tv_sec);
 }
 
 static void


More information about the svn-src-stable-8 mailing list