Slight interface change on the watchdog fido
Marius Strobl
marius at alchemy.franken.de
Sun Dec 10 07:29:23 PST 2006
On Sun, Dec 10, 2006 at 11:04:39AM +0100, Nick Hibma wrote:
> I'm planning on committing the following change to make the implementations
> of the various hardware watchdogs more consistent. A timeout of 0 passed to
> the ioctl is now a valid input and will disable the watchdog. Previously it
> produced an error for the Elan chip watchdog, which is _not_ what you want
> to see when disarming a watchdog :-) I'd appreciate review of the
> individual changes in the files by the following people. The change as a
> whole was discussed with phk.
>
> cognet at freebsd.org i80321_wdog.c (*)
> des ichwd.c (**)
> ambrisko ipmi.c
> marius mk48txx.c
> phk kern_clock.c, elan-mmcr.c, watchdog.c (**)
>
> (*) The i80321_wdog.c cannot be disarmed. Is this correct?
> (**) These have been tested to arm, disarm, and fire. Others have only been
> compile tested.
>
> This change has been tested on 6.2-STABLE and 7-CURRENT.
>
>
> Commit message:
>
> Convert all watchdog event handlers to the following format:
>
> - If the timeout value passed is >0 and acceptable arm the watchdog and set
> the *error to 0 (a watchdog is armed).
> - Otherwise disarm the watchdog and leave *error as is (valid disarm).
> - If the timeout value passed is 0, disarm the watchdog. set *error to an
> error if disarm failed.
>
I recognise this as the previous watchdog function API with
the extension that when told to disarm via a timeout value
of 0 the watchdog may now report failure to do so by setting
*error, correct? If so this is fine with the stock mk48txx.c.
Regarding your changes to watchdog.4 and watchdog.9 AFAICT
they violate the established style guidelines for FreeBSD
man pages; the source should wrap the line on sentence breaks.
Marius
More information about the freebsd-current
mailing list