title: Not able to set the watchdog timer timeout embedded linux
body: <p>I am developing my application for ARM9 based microprocessor using UBUNTU 12.04 and Qt4.8.</p>
  
  <p>I have an implementation of watchdog timer.</p>
  
  <p>I have implemented the watchdog timer as following.</p>
  
  <pre><code>int timeout = 30;    /* time in seconds */
  int rc = -1;    /* return value */
  int fd = -1; /* WDT Timer File Descriptor*/
  
  fd = open(WDT_DEVICE, O_WRONLY));
  if(-1 == fd)
  {
      qDebug() &lt;&lt; Q_FUNC_INFO &lt;&lt; "Failed to Open Device : " &lt;&lt; WDT_DEVICE;
      return -1;
  }
  
  
  if(ioctl(fd,WDIOC_SETTIMEOUT, &amp;timeout) != 0)
  {
      qDebug() &lt;&lt; Q_FUNC_INFO &lt;&lt; "Failed to set the timeout interval of : " &lt;&lt; timeout;
      return -1;
  }
  
  
  if(ioctl(fd,WDIOC_GETTIMEOUT, &amp;timeout) != 0);
  {
      qDebug() &lt;&lt; Q_FUNC_INFO &lt;&lt; "Failed to Get the timeout interval of : " &lt;&lt; timeout;
      return -1;
  }
  </code></pre>
  
  <p>Here I am unable to set the timeout interval. So bydefault system watchdog timer timeout 10 seconds are applied.</p>
  
  <blockquote>
    <p>ioctl(fd,WDIOC_SETTIMEOUT, &amp;timeout)</p>
  </blockquote>
  
  <p>returns -1 and failed.</p>
  
  <p>I want to use 30 seconds timeout. how i can do this ?</p>