Re: [PATCH 3/3] watchdog: xilinx: Add WDIOC_SETTIMEOUT ioctl function

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

 



On Thu, May 30, 2013 at 02:26:04PM +0200, Michal Simek wrote:
> Standard watchdog programs try to setup timeout
> via ioctl and this functionality should be implemented.
> Timeout value is hardcoded in the hardware but
> based on Documentation/watchdog/watchdog-api.txt
> can return the real timeout used in the same variable.
> 
> Signed-off-by: Michal Simek <michal.simek@xxxxxxxxxx>
> ---
>  drivers/watchdog/of_xilinx_wdt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
> index 79f358c..a3bbe72 100644
> --- a/drivers/watchdog/of_xilinx_wdt.c
> +++ b/drivers/watchdog/of_xilinx_wdt.c
> @@ -253,6 +253,7 @@ static long xwdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>  		xwdt_keepalive();
>  		return 0;
> 
> +	case WDIOC_SETTIMEOUT:
>  	case WDIOC_GETTIMEOUT:
>  		if (no_timeout)
>  			return -ENOTTY;

Watchdog programs should check ident.options before trying to set the timeout.
If they don't, there is an application bug. I don't think it is a good idea
to start hacking the kernel to work around application bugs.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux