Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 2025 13:53:51 GMT
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 904ac13eed05 - main - watchdog: Update man page for new API
Message-ID:  <202509251353.58PDrp5w038406@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=904ac13eed05fa6153393d692f8ecd45b5dabe11

commit 904ac13eed05fa6153393d692f8ecd45b5dabe11
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2025-09-25 13:52:29 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2025-09-25 13:55:56 +0000

    watchdog: Update man page for new API
    
    Update man page to account for chnage in timeout representation
    (sbintime_t vs power-of-2 nanoseconds), and addition of new
    WDIOC_CONTROL ioctl.
    
    Reviewed by:    ziaee
    MFC after:      3 days
    Sponsored by:   Juniper Networks, Inc.
    Differential Revision:  https://reviews.freebsd.org/D52479
---
 share/man/man4/watchdog.4 | 62 +++++++++++++++++++++++++++++------------------
 1 file changed, 38 insertions(+), 24 deletions(-)

diff --git a/share/man/man4/watchdog.4 b/share/man/man4/watchdog.4
index b74640de8469..fc2d600328dd 100644
--- a/share/man/man4/watchdog.4
+++ b/share/man/man4/watchdog.4
@@ -41,24 +41,22 @@ The device
 supports several optional
 .Xr ioctl 2
 calls for configuration, and
-responds to a single operational
+responds to a set of operational
 .Xr ioctl 2
-call,
-.Dv WDIOCPATPAT .
-It takes a single argument which represents a timeout value specified as a
-power of two nanoseconds, or-ed with a flag selecting active or passive control
-of the watchdog.
+calls:
+.Bl -tag -width "WDIOC_CONTROL int  "
+.It Dv WDIOCPATPAT
+Pat the watchdog.
+.It Dv WDIOC_CONTROL
+Enable, disable, or reset the watchdog.
+.El
 .Pp
-.Dv WD_ACTIVE
-indicates that the
-.Nm
-will be kept from timing out from userland, for instance by the
-.Xr watchdogd 8
-daemon.
-.Dv WD_PASSIVE
-indicates that the
-.Nm
-will be kept from timing out from the kernel.
+The
+.Dv WDIOCPATPAT
+.Xr ioctl 2
+call takes a single argument which represents a timeout value specified as a
+.Vt sbintime_t
+of the timeout period for the watchdog.
 .Pp
 The
 .Dv WDIOCPATPAT
@@ -77,27 +75,43 @@ none of
 implementations support the timeout length, all watchdogs are disabled and must
 be explicitly re-enabled.
 .Pp
-To disable the watchdogs pass
-.Dv WD_TO_NEVER .
+To disable the watchdogs use the
+.Dv WDIOC_CONTROL
+.Xr ioctl 2
+call with the
+.Dv WD_CTRL_DISABLE
+flag.
 If disarming the watchdog(s) failed an error is returned.
 The watchdog might
 still be armed!
+To reenable the watchdogs use the
+.Dv WDIOC_CONTROL
+.Xr ioctl 2
+call with the
+.Dv WD_CTRL_ENABLE
+flag.
+Another way to pat the watchdog is with the
+.Dv WDIOC_CONTROL
+.Xr ioctl 2
+call passing the
+.Dv WDIOC_CTRL_RESET
+flag.
 .Pp
 The optional configuration
 .Xr ioctl 2
 commands are listed here, along with the type of the parameter used.
 Examples of their use can be found in
 .Xr watchdogd 8 .
-.Bl -tag -width "WDIOC_SETSOFTTIMEOUTACT int  "
-.It Dv WDIOC_SETTIMEOUT Fa int
+.Bl -tag -width "WDIOC_GETPRETTIMEOUT sbintime_t"
+.It Dv WDIOC_SETTIMEOUT Fa sbintime_t
 set/reset the timer
-.It Dv WDIOC_GETTIMEOUT Fa int
+.It Dv WDIOC_GETTIMEOUT Fa sbintime_t
 get total timeout
-.It Dv WDIOC_GETTIMELEFT Fa int
+.It Dv WDIOC_GETTIMELEFT Fa sbintime_t
 get time left
-.It Dv WDIOC_GETPRETIMEOUT Fa int
+.It Dv WDIOC_GETPRETIMEOUT Fa sbintime_t
 get the pre-timeout
-.It Dv WDIOC_SETPRETIMEOUT Fa int
+.It Dv WDIOC_SETPRETIMEOUT Fa sbintime_t
 set the pre-timeout
 .It Dv WDIOC_SETPRETIMEOUTACT Fa int
 Set the action when a pre-timeout occurs (see



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509251353.58PDrp5w038406>