X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fwatchdog%2Fmachzwd.c;h=e8dc517b44121c15481511b83c2179c37b917ddf;hb=27879d9d66f2dea19cfcd0e1df8358a33447f45b;hp=3782930e6f1f075565e318b10b83b612cb1f92ae;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c index 3782930e6..e8dc517b4 100644 --- a/drivers/char/watchdog/machzwd.c +++ b/drivers/char/watchdog/machzwd.c @@ -305,6 +305,10 @@ static void zf_ping(unsigned long data) static ssize_t zf_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { + /* Can't seek (pwrite) on this device */ + if (ppos != &file->f_pos) + return -ESPIPE; + /* See if we got the magic character */ if(count){ @@ -385,7 +389,7 @@ static int zf_open(struct inode *inode, struct file *file) zf_timer_on(); - return nonseekable_open(inode, file); + return 0; } static int zf_close(struct inode *inode, struct file *file)