lkml.org 
[lkml]   [2019]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] selftests: watchdog: Add optional file argument
Hi George,

On Thu, Aug 29, 2019 at 12:39:25AM -0400, George G. Davis wrote:
> Some systems have multiple watchdog devices where the first device
> registered is assigned to the /dev/watchdog device file.

Confirmed on R-Car H3-Salvator-X:

root@rcar-gen3:~# ls -al /dev/watchdog*
crw------- 1 root root 10, 130 Aug 21 09:38 /dev/watchdog
crw------- 1 root root 247, 0 Aug 21 09:38 /dev/watchdog0

[..]

> - fd = open("/dev/watchdog", O_WRONLY);
> + while ((c = getopt_long(argc, argv, sopts, lopts, NULL)) != -1) {
> + if (c == 'f')
> + file = optarg;
> + }
> +
> + fd = open(file, O_WRONLY);

Would it be possible to improve below not so helpful and slightly
misleading printout:

$ ./watchdog-test -d -t 10 -p 5 -e -f /dev/watch
Watchdog device not enabled.

Thanks!

--
Best Regards,
Eugeniu.

\
 
 \ /
  Last update: 2019-08-29 16:38    [W:0.056 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site