From: Guenter Roeck <linux@roeck-us.net>
To: Timur Tabi <timur@codeaurora.org>,
Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org
Subject: Re: [PATCH 2/2] Documentation/watchdog: add support for magic close to watchdog-test
Date: Thu, 23 Jun 2016 06:45:03 -0700 [thread overview]
Message-ID: <576BE7DF.6020209@roeck-us.net> (raw)
In-Reply-To: <1466550015-14924-2-git-send-email-timur@codeaurora.org>
On 06/21/2016 04:00 PM, Timur Tabi wrote:
> Some drivers have the WDIOF_MAGICCLOSE set, which means that applications
> need to write 'V' to the watchdog device before closing, otherwise the
> driver won't stop the watchdog timer.
>
> Signed-off-by: Timur Tabi <timur@codeaurora.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> Documentation/watchdog/src/watchdog-test.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/watchdog/src/watchdog-test.c b/Documentation/watchdog/src/watchdog-test.c
> index b3cc7aa..c691539 100644
> --- a/Documentation/watchdog/src/watchdog-test.c
> +++ b/Documentation/watchdog/src/watchdog-test.c
> @@ -13,6 +13,7 @@
> #include <linux/watchdog.h>
>
> int fd;
> +const char v = 'V';
>
> /*
> * This function simply sends an IOCTL to the driver, which in turn ticks
> @@ -34,6 +35,7 @@ static void keep_alive(void)
>
> static void term(int sig)
> {
> + write(fd, &v, 1);
> close(fd);
> printf("\nStopping watchdog ticks...\n");
> exit(0);
> @@ -89,6 +91,7 @@ int main(int argc, char *argv[])
> sleep(ping_rate);
> }
> end:
> + write(fd, &v, 1);
> close(fd);
> return 0;
> }
>
next prev parent reply other threads:[~2016-06-23 13:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 23:00 [PATCH 1/2] Documentation/watchdog: use stdout instead of stderr in watchdog-test Timur Tabi
2016-06-21 23:00 ` [PATCH 2/2] Documentation/watchdog: add support for magic close to watchdog-test Timur Tabi
2016-06-23 13:45 ` Guenter Roeck [this message]
2016-07-17 20:17 ` Wim Van Sebroeck
2016-06-23 13:44 ` [PATCH 1/2] Documentation/watchdog: use stdout instead of stderr in watchdog-test Guenter Roeck
2016-07-17 20:17 ` Wim Van Sebroeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=576BE7DF.6020209@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-watchdog@vger.kernel.org \
--cc=timur@codeaurora.org \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).