CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2021/01/30 01:44:42
Modified files:
usr.bin/systat : main.c
Log message:
Fix delay parsing by stealing from strtonum and returning a proper error to
the user when an invalid value is entered instead of silently falling back
to the default 5s.
While here I also capped the upper limit to UINT32_MAX / 1000000 to prevent
useconds_t overflow. This hard limits us to 4294s, instead of the current
soft limit which just make systat go berserk if you go over it.
Reported and original diff by Nick Gasson nick <at> nickg <dot> me <dot> uk
OK cheloha@
Tweaks and OK bluhm@