From 40de1bb4fec2d17ad0aa10d8b0f7fa05c4d4a196 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Wed, 24 Jun 2020 03:04:25 +0200 Subject: Some more minor annotations --- minecproxy/main.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'minecproxy') 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 -- cgit v1.2.3