Skip to content
  • Hans Dedecker's avatar
    watchdog: improve seting watchdog timeout and frequency · 20192e47
    Hans Dedecker authored
    
    
    Due to the watchdog file descriptor check in both watchdog_timeout and
    watchdog_frequency it's impossible to set the timeout/frequency via ubus
    in case the watchdog was stopped.
    Fix this by removing the watchdog file descriptor check in both functions
    and by caching locally the set watchdog driver timeout value. The latter
    will be used to set the watchdog driver timeout value in case the
    watchdog is active or when the watchdog is started.
    In addition when parsing the watchdog ubus call check if timeout
    attribute is set so the correct value is used when doing the frequency
    sanity check.
    
    Signed-off-by: default avatarHans Dedecker <dedeckeh@gmail.com>
    20192e47