From 3466da49480ff27a4560bfe2cb1700a5e98bdb55 Mon Sep 17 00:00:00 2001 From: emaste Date: Tue, 7 Feb 2012 03:15:12 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.freebsd.org/base/stable/8@231107 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.bin/vmstat/vmstat.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index cf4b73a07..98503ccbc 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -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 -- 2.45.0