Commit 924dae54 authored by Dave Jones's avatar Dave Jones

[PATCH] strtok->strsep for autofs4

parent fb189f19
...@@ -110,7 +110,9 @@ static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid, ...@@ -110,7 +110,9 @@ static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid,
*pipefd = -1; *pipefd = -1;
if ( !options ) return 1; if ( !options ) return 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) if ((value = strchr(this_char,'=')) != NULL)
*value++ = 0; *value++ = 0;
if (!strcmp(this_char,"fd")) { if (!strcmp(this_char,"fd")) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment