BUG/MINOR: tools: make parse_time_err() more strict on the timer validity
First, an error is now reported if the first character is not a digit. Thus,
"timeout client s" triggers an error now. Then 'u' is also rejected
now. 'us' is valid and should be used set the timer in microseconds. However
'u' alone is not a valid unit. It was just ignored before (default to
milliseconds). Now, it is an error. Finally, a warning is reported if the
end of the text is not reached after the timer parsing. This warning will
probably be switched to an error in a futur version.
This patch must be backported to all stable versions.
(cherry picked from commit
c20ad0d8dbd1bb5707bbfe23632415c3062e046c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit
761d1fb53d20b75f403c1b2032649fcab0e7f280)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit
6c689a0aa32745becc1fa327ba358be7dafa160f)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>