From: Derrick Brashear Date: Fri, 11 Jun 2010 19:06:24 +0000 (-0400) Subject: dafs state analyzer shouldn't require trailing spaces in commands X-Git-Tag: openafs-devel-1_5_75~160 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6bc2b1af64a12a0cd3b3792803b71e92099425af;p=packages%2Fo%2Fopenafs.git dafs state analyzer shouldn't require trailing spaces in commands 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 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/tviced/state_analyzer.c b/src/tviced/state_analyzer.c index d3bfd38bc..11928d830 100644 --- a/src/tviced/state_analyzer.c +++ b/src/tviced/state_analyzer.c @@ -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) {