From 45bb7fa203fe29b21af1cddb013ac1876c510ddc Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Tue, 2 Apr 2002 19:57:42 -0800 Subject: [PATCH] [PATCH] strtok->strsep for reiserfs --- fs/reiserfs/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 9cfe3c98ef77..4698081c8d34 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -508,7 +508,9 @@ static int parse_options (char * options, unsigned long * mount_options, unsigne /* use default configuration: create tails, journaling on, no conversion to newest format */ 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, "notail")) { -- 2.39.5