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
c4dbf1de
Commit
c4dbf1de
authored
Apr 02, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strtok -> strsep fixes
parent
bcbcfa85
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
27 deletions
+33
-27
fs/devpts/inode.c
fs/devpts/inode.c
+3
-3
fs/ext2/super.c
fs/ext2/super.c
+3
-3
fs/ext3/super.c
fs/ext3/super.c
+3
-3
fs/fat/inode.c
fs/fat/inode.c
+3
-2
fs/intermezzo/super.c
fs/intermezzo/super.c
+3
-3
fs/nfs/nfsroot.c
fs/nfs/nfsroot.c
+3
-3
fs/proc/inode.c
fs/proc/inode.c
+5
-2
fs/udf/super.c
fs/udf/super.c
+3
-2
fs/ufs/super.c
fs/ufs/super.c
+4
-5
fs/vfat/namei.c
fs/vfat/namei.c
+3
-1
No files found.
fs/devpts/inode.c
View file @
c4dbf1de
...
...
@@ -66,9 +66,9 @@ static int devpts_parse_options(char *options, struct devpts_sb_info *sbi)
char
*
this_char
,
*
value
;
this_char
=
NULL
;
if
(
options
)
this_char
=
strtok
(
options
,
","
);
for
(
;
this_char
;
this_char
=
strtok
(
NULL
,
","
))
{
while
((
this_char
=
strsep
(
&
options
,
","
))
!=
NULL
)
{
if
(
!*
this_char
)
continue
;
if
((
value
=
strchr
(
this_char
,
'='
))
!=
NULL
)
*
value
++
=
0
;
if
(
!
strcmp
(
this_char
,
"uid"
))
{
...
...
fs/ext2/super.c
View file @
c4dbf1de
...
...
@@ -221,9 +221,9 @@ static int parse_options (char * options, unsigned long * sb_block,
if
(
!
options
)
return
1
;
for
(
this_char
=
strtok
(
options
,
","
);
this_char
!=
NULL
;
this_char
=
strtok
(
NULL
,
","
))
{
while
((
this_char
=
strsep
(
&
options
,
","
))
!=
NULL
)
{
if
(
!*
this_char
)
continue
;
if
((
value
=
strchr
(
this_char
,
'='
))
!=
NULL
)
*
value
++
=
0
;
if
(
!
strcmp
(
this_char
,
"bsddf"
))
...
...
fs/ext3/super.c
View file @
c4dbf1de
...
...
@@ -554,9 +554,9 @@ static int parse_options (char * options, unsigned long * sb_block,
if
(
!
options
)
return
1
;
for
(
this_char
=
strtok
(
options
,
","
);
this_char
!=
NULL
;
this_char
=
strtok
(
NULL
,
","
))
{
while
((
this_char
=
strsep
(
&
options
,
","
))
!=
NULL
)
{
if
(
!*
this_char
)
continue
;
if
((
value
=
strchr
(
this_char
,
'='
))
!=
NULL
)
*
value
++
=
0
;
if
(
!
strcmp
(
this_char
,
"bsddf"
))
...
...
fs/fat/inode.c
View file @
c4dbf1de
...
...
@@ -224,8 +224,9 @@ static int parse_options(char *options, int *debug,
goto
out
;
save
=
0
;
savep
=
NULL
;
for
(
this_char
=
strtok
(
options
,
","
);
this_char
;
this_char
=
strtok
(
NULL
,
","
))
{
while
((
this_char
=
strsep
(
&
options
,
","
))
!=
NULL
)
{
if
(
!*
this_char
)
continue
;
if
((
value
=
strchr
(
this_char
,
'='
))
!=
NULL
)
{
save
=
*
value
;
savep
=
value
;
...
...
fs/intermezzo/super.c
View file @
c4dbf1de
...
...
@@ -120,12 +120,12 @@ static char *presto_options(char *options, char *cache_data,
store_opt
(
prestodev
,
NULL
,
PRESTO_PSDEV_NAME
"0"
);
CDEBUG
(
D_SUPER
,
"parsing options
\n
"
);
for
(
this_char
=
strtok
(
options
,
","
);
this_char
!=
NULL
;
this_char
=
strtok
(
NULL
,
","
))
{
while
((
this_char
=
strsep
(
&
options
,
","
))
!=
NULL
)
{
char
*
opt
;
CDEBUG
(
D_SUPER
,
"this_char %s
\n
"
,
this_char
);
if
(
!*
this_char
)
continue
;
if
(
(
opt
=
read_opt
(
"fileset"
,
this_char
))
)
{
store_opt
(
fileset
,
opt
,
NULL
);
continue
;
...
...
fs/nfs/nfsroot.c
View file @
c4dbf1de
...
...
@@ -202,8 +202,9 @@ static void __init root_nfs_parse(char *name, char *buf)
if
((
options
=
strchr
(
name
,
','
)))
{
*
options
++
=
0
;
cp
=
strtok
(
options
,
","
);
while
(
cp
)
{
while
((
cp
=
strsep
(
&
options
,
","
))
!=
NULL
)
{
if
(
!*
cp
)
continue
;
if
((
val
=
strchr
(
cp
,
'='
)))
{
struct
nfs_int_opts
*
opts
=
root_int_opts
;
*
val
++
=
'\0'
;
...
...
@@ -220,7 +221,6 @@ static void __init root_nfs_parse(char *name, char *buf)
nfs_data
.
flags
|=
opts
->
or_mask
;
}
}
cp
=
strtok
(
NULL
,
","
);
}
}
if
(
name
[
0
]
&&
strcmp
(
name
,
"default"
))
{
...
...
fs/proc/inode.c
View file @
c4dbf1de
...
...
@@ -133,8 +133,11 @@ static int parse_options(char *options,uid_t *uid,gid_t *gid)
*
uid
=
current
->
uid
;
*
gid
=
current
->
gid
;
if
(
!
options
)
return
1
;
for
(
this_char
=
strtok
(
options
,
","
);
this_char
;
this_char
=
strtok
(
NULL
,
","
))
{
if
(
!
options
)
return
1
;
while
((
this_char
=
strsep
(
&
options
,
","
))
!=
NULL
)
{
if
(
!*
this_char
)
continue
;
if
((
value
=
strchr
(
this_char
,
'='
))
!=
NULL
)
*
value
++
=
0
;
if
(
!
strcmp
(
this_char
,
"uid"
))
{
...
...
fs/udf/super.c
View file @
c4dbf1de
...
...
@@ -286,8 +286,9 @@ udf_parse_options(char *options, struct udf_options *uopt)
if
(
!
options
)
return
1
;
for
(
opt
=
strtok
(
options
,
","
);
opt
;
opt
=
strtok
(
NULL
,
","
))
{
while
((
opt
=
strsep
(
&
options
,
","
)
!=
NULL
)
{
if
(
!*
opt
)
continue
;
/* Make "opt=val" into two strings */
val
=
strchr
(
opt
,
'='
);
if
(
val
)
...
...
fs/ufs/super.c
View file @
c4dbf1de
...
...
@@ -257,11 +257,10 @@ static int ufs_parse_options (char * options, unsigned * mount_options)
if
(
!
options
)
return
1
;
for
(
this_char
=
strtok
(
options
,
","
);
this_char
!=
NULL
;
this_char
=
strtok
(
NULL
,
","
))
{
while
((
this_char
=
strsep
(
&
options
,
","
))
!=
NULL
)
{
if
(
!*
this_char
)
continue
;
if
((
value
=
strchr
(
this_char
,
'='
))
!=
NULL
)
*
value
++
=
0
;
if
(
!
strcmp
(
this_char
,
"ufstype"
))
{
...
...
fs/vfat/namei.c
View file @
c4dbf1de
...
...
@@ -115,7 +115,9 @@ static int parse_options(char *options, struct fat_mount_options *opts)
save
=
0
;
savep
=
NULL
;
ret
=
1
;
for
(
this_char
=
strtok
(
options
,
","
);
this_char
;
this_char
=
strtok
(
NULL
,
","
))
{
while
((
this_char
=
strsep
(
&
options
,
","
))
!=
NULL
)
{
if
(
!*
this_char
)
continue
;
if
((
value
=
strchr
(
this_char
,
'='
))
!=
NULL
)
{
save
=
*
value
;
savep
=
value
;
...
...
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