From nobody Thu Sep 25 13:53:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXZv35nwLz68Y0K; Thu, 25 Sep 2025 13:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXZv34t8Mz3J2g; Thu, 25 Sep 2025 13:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758808431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+r6JZpE2egsiFm7yU89cYpxiS3L5KYjblPccOXx+LlY=; b=ibaPJD4e459+XB/njCqZT4XtlMNSLphrN1PnRJoDj0wFM1A6pzPQCKJns/H2enKgi2f0nw OopJmS8wWXNiF0vjXCJtfaxZUHXCFm6wB9U+LU47PkTNDiryq6Eh4n1U1UGQpRkQzP3ZCz YufBp93CM/C5vg9xyPjUhgKWRU6xLrhY5dW1Md3gIfUq+mDUdX9/vN5L+s7fjBqd1oALtr 4M8pqMGAgsmR8cJCv/DLNUqLVIv2PJ9qZ7cIu9Cx4lHIlT/hc2i/NXGjapmp0HuvGEgf8u 0SGOl1ZQYimL2GOvynEayVNcaEleUFh85nkW2G517UeuJTpATXJk9TNnFcNdog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758808431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+r6JZpE2egsiFm7yU89cYpxiS3L5KYjblPccOXx+LlY=; b=bv2xZlWG2k1vb7Dv/81dWHhsp7yodCqu797TiZuu+6IgahT+YD5eCFjr8duyHBOXGA7XhJ lybSvav1g6fqX5HtGlaW5aQkcpkddwNO7RSZLKfI6y9T337oA04BGDYb2RON5Pei+DnZIz oGhrocnSwpoHfnCxZ6Hd2u8NnBdbRxDsINC4Nnv09cd/up5+MHWJIcqha/Qw5BnMRZdOYl Pnid/yUD72Poijxi7BqeGq9jD57NVXrcPpkMYFdVDIB1SHK8RJuVipybYi0/ZLJvi4EDJn xQJT11ZfXmSJ4Q6fSQSW5JcRV7NzhkWskfdYRWc7hXoSRbVnlmDkKO8lI3Rczg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758808431; a=rsa-sha256; cv=none; b=TuqT6pdO+Qh6NlWlKGmUT8IirwrZlqQaDS1+OXPiE34se6f+GdW8uIo+vQ8Kvh2sf+gaJD wGtp03SumCw0H724G063S7qwV6A1pEW8YObOhtjzobG/TLYwLV9oaJqgxCEQymMsT6+9rp 0k8aztQY3QJj/MbhqR6mCtSop5VocFoQzquYTR+MmVILG7zlvTZdcfKm+HzYLFJ4j2RRVs 1pln9PhfzeZrFb81jzDFlpTz7dlrEECqgrKpk2dqvsYTPDl5YOxUBY+BDkpAlCwlxjpEW0 SZkwhIO49FVnBb5Bw4N/2afaGUHfQhn+LziJUONZqJ2JoSFhEuoVb98PKrWNDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXZv34NTxz1JLR; Thu, 25 Sep 2025 13:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PDrpaI038409; Thu, 25 Sep 2025 13:53:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PDrp5w038406; Thu, 25 Sep 2025 13:53:51 GMT (envelope-from git) Date: Thu, 25 Sep 2025 13:53:51 GMT Message-Id: <202509251353.58PDrp5w038406@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 904ac13eed05 - main - watchdog: Update man page for new API List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 904ac13eed05fa6153393d692f8ecd45b5dabe11 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=904ac13eed05fa6153393d692f8ecd45b5dabe11 commit 904ac13eed05fa6153393d692f8ecd45b5dabe11 Author: Justin Hibbits AuthorDate: 2025-09-25 13:52:29 +0000 Commit: Justin Hibbits 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