Re: [PATCH] selftests: watchdog: Add optional file argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux