]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
dafs state analyzer shouldn't require trailing spaces in commands
authorDerrick Brashear <shadow@dementia.org>
Fri, 11 Jun 2010 19:06:24 +0000 (15:06 -0400)
committerDerrick Brashear <shadow@dementia.org>
Fri, 11 Jun 2010 19:16:20 +0000 (12:16 -0700)
the tokenizer didn't null out \n, but the strcmps for commands didn't deal,
so this basically works badly interactively. all commands not recognized.

Change-Id: Ifa7f8c0204a83d27f8876af8de94cb338499cdc0
Reviewed-on: http://gerrit.openafs.org/2125
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/tviced/state_analyzer.c

index d3bfd38bc4df2b7016af4993a7d128719029bfc1..11928d8307eee586b8653a4f20556e5361b4540f 100644 (file)
@@ -381,10 +381,10 @@ prompt(void)
                strlcpy(prev_input, input, sizeof(prev_input));
            }
 
-           tok = strtok(input, " \t");
+           tok = strtok(input, " \t\n");
        }
        while (tok && !strcmp(tok, ";")) {
-           tok = strtok(NULL, "; \t");
+           tok = strtok(NULL, "; \t\n");
        }
 
        if (!tok) {