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
nexedi
linux
Commits
60b00ad8
Commit
60b00ad8
authored
22 years ago
by
Neil Brown
Committed by
Linus Torvalds
22 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kNFSd: get_int and get_expiry to help in parsing.
parent
5ce8b167
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
include/linux/sunrpc/cache.h
include/linux/sunrpc/cache.h
+24
-0
No files found.
include/linux/sunrpc/cache.h
View file @
60b00ad8
...
@@ -275,4 +275,28 @@ extern void add_word(char **bpp, int *lp, char *str);
...
@@ -275,4 +275,28 @@ extern void add_word(char **bpp, int *lp, char *str);
extern
void
add_hex
(
char
**
bpp
,
int
*
lp
,
char
*
buf
,
int
blen
);
extern
void
add_hex
(
char
**
bpp
,
int
*
lp
,
char
*
buf
,
int
blen
);
extern
int
get_word
(
char
**
bpp
,
char
*
dest
,
int
bufsize
);
extern
int
get_word
(
char
**
bpp
,
char
*
dest
,
int
bufsize
);
static
inline
int
get_int
(
char
**
bpp
,
int
*
anint
)
{
char
buf
[
50
];
char
*
ep
;
int
rv
;
int
len
=
get_word
(
bpp
,
buf
,
50
);
if
(
len
<
0
)
return
-
EINVAL
;
if
(
len
==
0
)
return
-
ENOENT
;
rv
=
simple_strtol
(
buf
,
&
ep
,
0
);
if
(
*
ep
)
return
-
EINVAL
;
*
anint
=
rv
;
return
0
;
}
static
inline
time_t
get_expiry
(
char
**
bpp
)
{
int
rv
;
if
(
get_int
(
bpp
,
&
rv
))
return
0
;
if
(
rv
<
0
)
return
0
;
return
rv
;
}
#endif
/* _LINUX_SUNRPC_CACHE_H_ */
#endif
/* _LINUX_SUNRPC_CACHE_H_ */
This diff is collapsed.
Click to expand it.
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