X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Fcommands.c;h=887cabad64cfc685f694f20cefa08e615e0c7c5d;hb=b4f94d758f9eadf45e3fbefcc8dc5701ab73bfca;hp=d48dd513d760303790e0a1c2ae20c5a0a20d4476;hpb=f2fc83b40f06da6a6b2476005279ba52d4ce3c44;p=dpdk.git diff --git a/app/test/commands.c b/app/test/commands.c index d48dd513d7..887cabad64 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -8,8 +8,6 @@ #include #include #include -#include -#include #include #include #include @@ -25,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -381,3 +378,14 @@ int commands_init(void) cmd_autotest_autotest.string_data.str = commands; return 0; } + +int command_valid(const char *cmd) +{ + struct test_command *t; + + TAILQ_FOREACH(t, &commands_list, next) { + if (strcmp(t->command, cmd) == 0) + return 1; + } + return 0; +}