Date: Thu, 17 Mar 2011 01:05:54 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r219708 - head/usr.bin/vmstat Message-ID: <201103170105.p2H15suE009566@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Thu Mar 17 01:05:54 2011 New Revision: 219708 URL: http://svn.freebsd.org/changeset/base/219708 Log: Remove 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: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c ============================================================================== --- head/usr.bin/vmstat/vmstat.c Thu Mar 17 00:29:53 2011 (r219707) +++ head/usr.bin/vmstat/vmstat.c Thu Mar 17 01:05:54 2011 (r219708) @@ -409,14 +409,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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103170105.p2H15suE009566>