summaryrefslogtreecommitdiffstats
path: root/usr.bin/vmstat/vmstat.c
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2011-03-17 01:05:54 +0000
committeremaste <emaste@FreeBSD.org>2011-03-17 01:05:54 +0000
commitb5cdb59a0d2628f4b43d932c4967ce860a00a8b7 (patch)
tree4f2c9cccba1657d04d84a4250322fb080c2df245 /usr.bin/vmstat/vmstat.c
parent69fd3173b85e09555e751babb9f17e078aa7038c (diff)
downloadFreeBSD-src-b5cdb59a0d2628f4b43d932c4967ce860a00a8b7.zip
FreeBSD-src-b5cdb59a0d2628f4b43d932c4967ce860a00a8b7.tar.gz
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.
Diffstat (limited to 'usr.bin/vmstat/vmstat.c')
-rw-r--r--usr.bin/vmstat/vmstat.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index cba3f73..cda77ad 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -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
OpenPOWER on IntegriCloud