CVS: is/fs25 super.c,1.1,1.2
Robert Read <[email protected]> Fri, 11 Oct 2002 16:55:47 -0700
| Newsgroups | gmane.comp.file-systems.intermezzo.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/intermezzo/is/fs25
In directory usw-pr-cvs1:/tmp/cvs-serv2450
Modified Files:
super.c
Log Message:
* replace strtok with strsep
Index: super.c
===================================================================
RCS file: /cvsroot/intermezzo/is/fs25/super.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -U2 -r1.1 -r1.2
--- super.c 11 Oct 2002 22:52:01 -0000 1.1
+++ super.c 11 Oct 2002 23:55:44 -0000 1.2
@@ -41,5 +41,5 @@
#include <linux/stat.h>
#include <linux/string.h>
-#include <linux/locks.h>
+#include <linux/smp_lock.h>
#include <linux/blkdev.h>
#include <linux/init.h>
@@ -123,4 +123,5 @@
{
char *this_char;
+ char *opt_ptr = options;
char *cache_data_end = cache_data;
@@ -136,8 +137,8 @@
CDEBUG(D_SUPER, "parsing options\n");
- for (this_char = strtok (options, ",");
- this_char != NULL;
- this_char = strtok (NULL, ",")) {
+ while ((this_char = strsep (&opt_ptr, ",")) != NULL) {
char *opt;
+ if (!*this_char)
+ continue;
CDEBUG(D_SUPER, "this_char %s\n", this_char);
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf