add: coverage in cmake
fix: remove unsed cli call 'test'
This commit is contained in:
parent
d5f4820196
commit
251389a454
4 changed files with 27 additions and 32 deletions
helpers
|
@ -8,15 +8,11 @@
|
|||
#include <helpers.h>
|
||||
|
||||
static const char *const usage[] = {
|
||||
"controller [options] [[--] args]",
|
||||
"controller [options]",
|
||||
"core [options] [[--] args]",
|
||||
"core [options]",
|
||||
NULL,
|
||||
};
|
||||
|
||||
#define PERM_READ (1<<0)
|
||||
#define PERM_WRITE (1<<1)
|
||||
#define PERM_EXEC (1<<2)
|
||||
|
||||
void
|
||||
helper_parse_cli(int argc, const char **argv, config_t *config)
|
||||
{
|
||||
|
@ -40,22 +36,18 @@ helper_parse_cli(int argc, const char **argv, config_t *config)
|
|||
|
||||
if(argc == 1)
|
||||
{
|
||||
config->run_type = RUN_TYPE_INVALID;
|
||||
if(strcmp(argv[0], "start") == 0)
|
||||
{
|
||||
config->run_type = RUN_TYPE_START;
|
||||
return;
|
||||
}
|
||||
if(strcmp(argv[0], "test") == 0)
|
||||
{
|
||||
config->run_type = RUN_TYPE_TEST;
|
||||
return;
|
||||
}
|
||||
LOG_FATAL("bad action '%s' given ('start', 'test')\n", argv[0]);
|
||||
LOG_FATAL("bad action '%s' given ('start')\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_FATAL("no action given ('start', 'test')\n");
|
||||
LOG_FATAL("no action given ('start')\n");
|
||||
exit(1);
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue