From b40c4b069a600af86c1f20ee09cbf5052c1552bf Mon Sep 17 00:00:00 2001 From: Guenter Kukkukk Date: Tue, 12 Mar 2013 04:51:03 +0100 Subject: [PATCH] vfstest: fix the "-c" multiple-command option Signed-off-by: Guenter Kukkukk Reviewed-by: Richard Sharpe --- source3/torture/vfstest.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c index 54365e0350b..2cec68711d1 100644 --- a/source3/torture/vfstest.c +++ b/source3/torture/vfstest.c @@ -108,7 +108,12 @@ static char *next_command(TALLOC_CTX *ctx, char **cmdstr) if (p) *p = '\0'; command = talloc_strdup(ctx, *cmdstr); - *cmdstr = p; + + /* Pass back the remaining cmdstring + (a trailing delimiter ";" does also work), + or NULL at last cmdstring. + */ + *cmdstr = p ? p + 1 : p; return command; } -- 2.11.4.GIT