summaryrefslogtreecommitdiff
path: root/minecproxy
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-24 03:04:25 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-24 03:04:25 +0200
commit40de1bb4fec2d17ad0aa10d8b0f7fa05c4d4a196 (patch)
tree32af533853b15fb50e9d753685fd1a53ad789e15 /minecproxy
parent1865f867fbe24ad11351ae2a196f117d8d55d0ca (diff)
Some more minor annotations
Diffstat (limited to 'minecproxy')
-rw-r--r--minecproxy/main.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/minecproxy/main.c b/minecproxy/main.c
index 7cd3336..790bbfe 100644
--- a/minecproxy/main.c
+++ b/minecproxy/main.c
@@ -419,7 +419,7 @@ const struct {
};
_noreturn_ static void
-usage(char **argv, bool invalid)
+usage(bool invalid)
{
if (invalid)
info("Invalid option(s)");
@@ -427,7 +427,8 @@ usage(char **argv, bool invalid)
info("Usage: %s [OPTIONS]\n"
"\n"
"Valid options:\n"
- " -c, --cfgdir=DIR\tlook for configuration files in DIR\n"
+ " -c, --cfgdir=DIR\tlook for server configuration files in DIR\n"
+ " -C, --cfgfile=PATH\tuse PATH as the main configuration file\n"
" -u, --user=USER\trun as USER\n"
" -D, --daemonize\trun in daemon mode (disables stderr output)\n"
" -l, --logfile=FILE\tlog to FILE instead of stderr\n"
@@ -436,7 +437,7 @@ usage(char **argv, bool invalid)
" -d, --debug=CATEGORY\tenable debugging for CATEGORY\n"
"\t\t\t(use \"list\" to see available categories,\n"
"\t\t\t or \"all\" to enable all categories)\n",
- argv ? argv[0] : "mcproxy");
+ program_invocation_short_name);
exit(invalid ? EXIT_FAILURE : EXIT_SUCCESS);
}
@@ -548,23 +549,23 @@ cfg_init(int argc, char **argv)
}
if (!debug_category_str[i].name)
- usage(argv, true);
+ usage(true);
debug_mask |= DBG_VERBOSE;
debug_mask |= debug_category_str[i].val;
break;
case 'h':
- usage(argv, false);
+ usage(false);
default:
- usage(argv, true);
+ usage(true);
}
}
if (optind < argc)
- usage(argv, true);
+ usage(true);
}
static void