http://linux-watchdog.bkbits.net/linux-2.6-watchdog-mm wim@iguana.be|ChangeSet|20040820091839|36933 wim # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/20 11:18:39+02:00 wim@iguana.be # [WATCHDOG] v2.6.8.1 watchdog-llseek-patch # # The watchdog drivers use a VFS implementation and thus should not be # lseek'able, so we put a '.llseek = no_llseek' in the file_operations # structure. # # drivers/char/watchdog/wdt977.c # 2004/08/20 11:18:28+02:00 wim@iguana.be +1 -0 # The watchdog drivers use a VFS implementation and thus should not be # lseek'able, so we put a '.llseek = no_llseek' in the file_operations # structure. # # drivers/char/watchdog/wdt285.c # 2004/08/20 11:18:28+02:00 wim@iguana.be +1 -0 # The watchdog drivers use a VFS implementation and thus should not be # lseek'able, so we put a '.llseek = no_llseek' in the file_operations # structure. # # drivers/char/watchdog/scx200_wdt.c # 2004/08/20 11:18:28+02:00 wim@iguana.be +1 -0 # The watchdog drivers use a VFS implementation and thus should not be # lseek'able, so we put a '.llseek = no_llseek' in the file_operations # structure. # # drivers/char/watchdog/sc1200wdt.c # 2004/08/20 11:18:28+02:00 wim@iguana.be +1 -0 # The watchdog drivers use a VFS implementation and thus should not be # lseek'able, so we put a '.llseek = no_llseek' in the file_operations # structure. # # drivers/char/watchdog/sa1100_wdt.c # 2004/08/20 11:18:28+02:00 wim@iguana.be +1 -0 # The watchdog drivers use a VFS implementation and thus should not be # lseek'able, so we put a '.llseek = no_llseek' in the file_operations # structure. # # drivers/char/watchdog/mixcomwd.c # 2004/08/20 11:18:28+02:00 wim@iguana.be +1 -0 # The watchdog drivers use a VFS implementation and thus should not be # lseek'able, so we put a '.llseek = no_llseek' in the file_operations # structure. # # drivers/char/watchdog/machzwd.c # 2004/08/20 11:18:28+02:00 wim@iguana.be +1 -0 # The watchdog drivers use a VFS implementation and thus should not be # lseek'able, so we put a '.llseek = no_llseek' in the file_operations # structure. # # drivers/char/watchdog/ixp4xx_wdt.c # 2004/08/20 11:18:28+02:00 wim@iguana.be +1 -0 # The watchdog drivers use a VFS implementation and thus should not be # lseek'able, so we put a '.llseek = no_llseek' in the file_operations # structure. # # drivers/char/watchdog/indydog.c # 2004/08/20 11:18:28+02:00 wim@iguana.be +1 -0 # The watchdog drivers use a VFS implementation and thus should not be # lseek'able, so we put a '.llseek = no_llseek' in the file_operations # structure. # # drivers/char/watchdog/ib700wdt.c # 2004/08/20 11:18:28+02:00 wim@iguana.be +1 -0 # The watchdog drivers use a VFS implementation and thus should not be # lseek'able, so we put a '.llseek = no_llseek' in the file_operations # structure. # # ChangeSet # 2004/08/20 10:55:20+02:00 wim@iguana.be # [WATCHDOG] v2.6.8.1 cpu5wdt.c-nonseekable_open-patch # # cpu5wdt also contains a VFS and thus should be "nonseekable_open" # # drivers/char/watchdog/cpu5wdt.c # 2004/08/20 10:55:12+02:00 wim@iguana.be +2 -1 # cpu5wdt also contains a VFS and thus should be "nonseekable_open" # # ChangeSet # 2004/08/20 09:02:36+02:00 fl@fl.priv.at # [WATCHDOG] pcwd-watchdog.txt-patch # # Fix example program in pcwd-watchdog.txt document. # # Documentation/watchdog/pcwd-watchdog.txt # 2004/08/20 09:02:20+02:00 fl@fl.priv.at +2 -1 # Fix example program in pcwd-watchdog.txt document. # # ChangeSet # 2004/08/20 08:29:39+02:00 arnd@arndb.de # [WATCHDOG] v2.6.8.1 compat_ioctl-patch # # The watchdog ioctl interface is defined correctly for 32 bit emulation, # although WIOC_GETSUPPORT was not marked as such, for an unclear reason. # WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT were added in may 2002 to the # code but never to the ioctl list. This adds all three definitions. # # Signed-off-by: Arnd Bergmann # Signed-off-by: Wim Van Sebroeck # # include/linux/compat_ioctl.h # 2004/08/20 08:29:31+02:00 arnd@arndb.de +4 -2 # The watchdog ioctl interface is defined correctly for 32 bit emulation, # although WIOC_GETSUPPORT was not marked as such, for an unclear reason. # WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT were added in may 2002 to the # code but never to the ioctl list. This adds all three definitions. # # Signed-off-by: Arnd Bergmann # Signed-off-by: Wim Van Sebroeck # diff -Nru a/Documentation/watchdog/pcwd-watchdog.txt b/Documentation/watchdog/pcwd-watchdog.txt --- a/Documentation/watchdog/pcwd-watchdog.txt 2004-08-21 23:57:09 -07:00 +++ b/Documentation/watchdog/pcwd-watchdog.txt 2004-08-21 23:57:09 -07:00 @@ -35,7 +35,8 @@ #include #include #include -#include +#include +#include int fd; diff -Nru a/drivers/char/watchdog/cpu5wdt.c b/drivers/char/watchdog/cpu5wdt.c --- a/drivers/char/watchdog/cpu5wdt.c 2004-08-21 23:57:09 -07:00 +++ b/drivers/char/watchdog/cpu5wdt.c 2004-08-21 23:57:09 -07:00 @@ -134,7 +134,7 @@ if ( test_and_set_bit(0, &cpu5wdt_device.inuse) ) return -EBUSY; - return 0; + return nonseekable_open(inode, file); } static int cpu5wdt_release(struct inode *inode, struct file *file) @@ -198,6 +198,7 @@ static struct file_operations cpu5wdt_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .ioctl = cpu5wdt_ioctl, .open = cpu5wdt_open, .write = cpu5wdt_write, diff -Nru a/drivers/char/watchdog/ib700wdt.c b/drivers/char/watchdog/ib700wdt.c --- a/drivers/char/watchdog/ib700wdt.c 2004-08-21 23:57:09 -07:00 +++ b/drivers/char/watchdog/ib700wdt.c 2004-08-21 23:57:09 -07:00 @@ -263,6 +263,7 @@ static struct file_operations ibwdt_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .write = ibwdt_write, .ioctl = ibwdt_ioctl, .open = ibwdt_open, diff -Nru a/drivers/char/watchdog/indydog.c b/drivers/char/watchdog/indydog.c --- a/drivers/char/watchdog/indydog.c 2004-08-21 23:57:09 -07:00 +++ b/drivers/char/watchdog/indydog.c 2004-08-21 23:57:09 -07:00 @@ -162,6 +162,7 @@ static struct file_operations indydog_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .write = indydog_write, .ioctl = indydog_ioctl, .open = indydog_open, diff -Nru a/drivers/char/watchdog/ixp4xx_wdt.c b/drivers/char/watchdog/ixp4xx_wdt.c --- a/drivers/char/watchdog/ixp4xx_wdt.c 2004-08-21 23:57:09 -07:00 +++ b/drivers/char/watchdog/ixp4xx_wdt.c 2004-08-21 23:57:09 -07:00 @@ -170,6 +170,7 @@ static struct file_operations ixp4xx_wdt_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .write = ixp4xx_wdt_write, .ioctl = ixp4xx_wdt_ioctl, .open = ixp4xx_wdt_open, diff -Nru a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c --- a/drivers/char/watchdog/machzwd.c 2004-08-21 23:57:09 -07:00 +++ b/drivers/char/watchdog/machzwd.c 2004-08-21 23:57:09 -07:00 @@ -425,6 +425,7 @@ static struct file_operations zf_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .write = zf_write, .ioctl = zf_ioctl, .open = zf_open, diff -Nru a/drivers/char/watchdog/mixcomwd.c b/drivers/char/watchdog/mixcomwd.c --- a/drivers/char/watchdog/mixcomwd.c 2004-08-21 23:57:09 -07:00 +++ b/drivers/char/watchdog/mixcomwd.c 2004-08-21 23:57:09 -07:00 @@ -197,6 +197,7 @@ static struct file_operations mixcomwd_fops= { .owner = THIS_MODULE, + .llseek = no_llseek, .write = mixcomwd_write, .ioctl = mixcomwd_ioctl, .open = mixcomwd_open, diff -Nru a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c --- a/drivers/char/watchdog/sa1100_wdt.c 2004-08-21 23:57:09 -07:00 +++ b/drivers/char/watchdog/sa1100_wdt.c 2004-08-21 23:57:09 -07:00 @@ -162,6 +162,7 @@ static struct file_operations sa1100dog_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .write = sa1100dog_write, .ioctl = sa1100dog_ioctl, .open = sa1100dog_open, diff -Nru a/drivers/char/watchdog/sc1200wdt.c b/drivers/char/watchdog/sc1200wdt.c --- a/drivers/char/watchdog/sc1200wdt.c 2004-08-21 23:57:09 -07:00 +++ b/drivers/char/watchdog/sc1200wdt.c 2004-08-21 23:57:09 -07:00 @@ -301,6 +301,7 @@ static struct file_operations sc1200wdt_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .write = sc1200wdt_write, .ioctl = sc1200wdt_ioctl, .open = sc1200wdt_open, diff -Nru a/drivers/char/watchdog/scx200_wdt.c b/drivers/char/watchdog/scx200_wdt.c --- a/drivers/char/watchdog/scx200_wdt.c 2004-08-21 23:57:09 -07:00 +++ b/drivers/char/watchdog/scx200_wdt.c 2004-08-21 23:57:09 -07:00 @@ -201,6 +201,7 @@ static struct file_operations scx200_wdt_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .write = scx200_wdt_write, .ioctl = scx200_wdt_ioctl, .open = scx200_wdt_open, diff -Nru a/drivers/char/watchdog/wdt285.c b/drivers/char/watchdog/wdt285.c --- a/drivers/char/watchdog/wdt285.c 2004-08-21 23:57:09 -07:00 +++ b/drivers/char/watchdog/wdt285.c 2004-08-21 23:57:09 -07:00 @@ -180,6 +180,7 @@ static struct file_operations watchdog_fops = { .owner = THIS_MODULE, + .llseek = no_llseek, .write = watchdog_write, .ioctl = watchdog_ioctl, .open = watchdog_open, diff -Nru a/drivers/char/watchdog/wdt977.c b/drivers/char/watchdog/wdt977.c --- a/drivers/char/watchdog/wdt977.c 2004-08-21 23:57:09 -07:00 +++ b/drivers/char/watchdog/wdt977.c 2004-08-21 23:57:09 -07:00 @@ -392,6 +392,7 @@ static struct file_operations wdt977_fops= { .owner = THIS_MODULE, + .llseek = no_llseek, .write = wdt977_write, .ioctl = wdt977_ioctl, .open = wdt977_open, diff -Nru a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h --- a/include/linux/compat_ioctl.h 2004-08-21 23:57:09 -07:00 +++ b/include/linux/compat_ioctl.h 2004-08-21 23:57:09 -07:00 @@ -592,13 +592,15 @@ COMPATIBLE_IOCTL(ATMTCP_REMOVE) COMPATIBLE_IOCTL(ATMMPC_CTRL) COMPATIBLE_IOCTL(ATMMPC_DATA) -/* Big W */ -/* WIOC_GETSUPPORT not yet implemented -E */ +/* Watchdog */ +COMPATIBLE_IOCTL(WDIOC_GETSUPPORT) COMPATIBLE_IOCTL(WDIOC_GETSTATUS) COMPATIBLE_IOCTL(WDIOC_GETBOOTSTATUS) COMPATIBLE_IOCTL(WDIOC_GETTEMP) COMPATIBLE_IOCTL(WDIOC_SETOPTIONS) COMPATIBLE_IOCTL(WDIOC_KEEPALIVE) +COMPATIBLE_IOCTL(WDIOC_SETTIMEOUT) +COMPATIBLE_IOCTL(WDIOC_GETTIMEOUT) /* Big R */ COMPATIBLE_IOCTL(RNDGETENTCNT) COMPATIBLE_IOCTL(RNDADDTOENTCNT)