core/main: Clean up option handling

- Add a missing space in the usage string
- Drop short option "p", which is unused
This commit is contained in:
Marian Buschsieweke 2020-05-26 14:16:00 +02:00 committed by Simon Ser
parent 4cd31295cf
commit 1e92d603a8

View file

@ -24,7 +24,7 @@ static int xdpw_usage(FILE* stream, int rc) {
" QUIET, ERROR, WARN, INFO, DEBUG, TRACE\n" " QUIET, ERROR, WARN, INFO, DEBUG, TRACE\n"
" -o, --output=<name> Select output to capture.\n" " -o, --output=<name> Select output to capture.\n"
" metadata (performs no conversion).\n" " metadata (performs no conversion).\n"
" -h,--help Get help (this text).\n" " -h, --help Get help (this text).\n"
"\n"; "\n";
fprintf(stream, "%s", usage); fprintf(stream, "%s", usage);
@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
const char* output_name = NULL; const char* output_name = NULL;
enum LOGLEVEL loglevel = ERROR; enum LOGLEVEL loglevel = ERROR;
static const char* shortopts = "l:o:p:h"; static const char* shortopts = "l:o:h";
static const struct option longopts[] = { static const struct option longopts[] = {
{ "loglevel", required_argument, NULL, 'l' }, { "loglevel", required_argument, NULL, 'l' },
{ "output", required_argument, NULL, 'o' }, { "output", required_argument, NULL, 'o' },