diff options
author | cbdev <cb@cbcdn.com> | 2021-11-27 15:52:11 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2021-11-27 15:52:11 +0100 |
commit | c14b8121b057b238c17f89995094d57a612f946f (patch) | |
tree | 6b1ef1b211a6b92b5cd9953e8fedf8ffd84a7da4 | |
parent | 41c2d135a4dc4d794094aa6ff0fe159455cd982a (diff) | |
parent | 1f31bc7d027e996e749093bc1bc2c4f70ab7fe48 (diff) | |
download | midimonster-c14b8121b057b238c17f89995094d57a612f946f.tar.gz midimonster-c14b8121b057b238c17f89995094d57a612f946f.tar.bz2 midimonster-c14b8121b057b238c17f89995094d57a612f946f.zip |
Merge branch 'master' of ssh://github.com/cbdevnet/midimonster
-rw-r--r-- | midimonster.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/midimonster.c b/midimonster.c index b1eafdf..0b01517 100644 --- a/midimonster.c +++ b/midimonster.c @@ -35,7 +35,14 @@ static void version(){ static int usage(char* fn){ version(); fprintf(stderr, "Usage:\n"); - fprintf(stderr, "\t%s <configfile>\n", fn); + fprintf(stderr, "\t%s [<options>] <configfile>\n", fn); + fprintf(stderr, "\nOptions:\n"); + fprintf(stderr, "\t-v,--version - show version\n"); + fprintf(stderr, "\t-b <backend> - override backend options (can be used multiple times)\n"); + fprintf(stderr, "\t-i <instance> - override instance options (can be used multiple times)\n"); + fprintf(stderr, "\t-h,--help - show this usage info\n"); + fprintf(stderr, "\nInstance/Backend options format:\n"); + fprintf(stderr, "<instance/backend>.<option>=<value>\n"); return EXIT_FAILURE; } @@ -68,6 +75,10 @@ static int args_parse(int argc, char** argv, char** cfg_file){ version(); return 1; } + else if(!strcmp(argv[u], "-h") || !strcmp(argv[u], "--help")){ + usage(argv[0]); + return 1; + } else if(!strcmp(argv[u], "-i")){ if(!argv[u + 1]){ fprintf(stderr, "Missing instance override specification\n"); |