mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
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.
This commit is contained in:
parent
dcbce41eb0
commit
ea9827d3be
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219708
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user