Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a74c51c3
Commit
a74c51c3
authored
Jan 02, 2004
by
Wim Van Sebroeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WATCHDOG] 2.6.0-rc1 i810-tco.c.nowayout.patch
Fix nowayout handling to the way all other watchdog-drivers do it
parent
df21fd50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
drivers/char/watchdog/i810-tco.c
drivers/char/watchdog/i810-tco.c
+16
-12
No files found.
drivers/char/watchdog/i810-tco.c
View file @
a74c51c3
...
...
@@ -197,7 +197,7 @@ static int i810tco_release (struct inode *inode, struct file *file)
/*
* Shut off the timer.
*/
if
(
tco_expect_close
==
42
&&
!
nowayout
)
{
if
(
tco_expect_close
==
42
)
{
tco_timer_stop
();
}
else
{
tco_timer_reload
();
...
...
@@ -217,17 +217,21 @@ static ssize_t i810tco_write (struct file *file, const char *data,
/* See if we got the magic character 'V' and reload the timer */
if
(
len
)
{
size_t
i
;
tco_expect_close
=
0
;
/* scan to see whether or not we got the magic character */
for
(
i
=
0
;
i
!=
len
;
i
++
)
{
u8
c
;
if
(
get_user
(
c
,
data
+
i
))
return
-
EFAULT
;
if
(
c
==
'V'
)
tco_expect_close
=
42
;
if
(
!
nowayout
)
{
size_t
i
;
/* note: just in case someone wrote the magic character
* five months ago... */
tco_expect_close
=
0
;
/* scan to see whether or not we got the magic character */
for
(
i
=
0
;
i
!=
len
;
i
++
)
{
u8
c
;
if
(
get_user
(
c
,
data
+
i
))
return
-
EFAULT
;
if
(
c
==
'V'
)
tco_expect_close
=
42
;
}
}
/* someone wrote to us, we should reload the timer */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment