]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix strtok botch which prevented extraction of rtdev name.
authorNathan Scott <nathans@sgi.com>
Tue, 20 Sep 2005 15:34:20 +0000 (15:34 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 20 Sep 2005 15:34:20 +0000 (15:34 +0000)
Merge of master-melb:xfs-cmds:23864a by kenmcd.

libxcmd/paths.c

index e25ae9aec6b95e971971f7dc586d809ecedfe64b..ab0fb9ac6ccf341f1b852a927f4f4cc72857c2cd 100644 (file)
@@ -155,24 +155,18 @@ fs_extract_mount_options(
        fslog = fsrt = fslogend = fsrtend = NULL;
 
        /* Extract log device and realtime device from mount options */
-       if ((fslog = hasmntopt(mnt, "logdev="))) {
+       if ((fslog = hasmntopt(mnt, "logdev=")))
                fslog += 7;
-               fslogend = strtok(fslog, " ,");
-       }
-       if ((fsrt = hasmntopt(mnt, "rtdev="))) {
+       if ((fsrt = hasmntopt(mnt, "rtdev=")))
                fsrt += 6;
-               fsrtend = strtok(fsrt, " ,");
-       }
 
        /* Do this only after we've finished processing mount options */
        if (fslog) {
-               if (fslogend != fslog)
-                       *fslogend = '\0'; /* terminate end of logdev name */
+               fslogend = strtok(fslog, " ,");
                fslog = strdup(fslog);
        }
        if (fsrt) {
-               if (fsrtend != fsrt)
-                       *fsrtend = '\0';  /* terminate end of rtdev name */
+               fsrtend = strtok(fsrt, " ,");
                fsrt = strdup(fsrt);
        }