writer: take --verbose without an argument, and say what -d takes

--verbose was declared required_argument while -v carries no colon in the getopt string,
so the long form consumed whatever followed it. "jfjoch_writer --verbose tcp://host:5400"
swallowed the address as the flag's argument and then failed for want of a data source -
the short form was fine, which is presumably why it went unnoticed.

The usage line for the root directory asked for <int>. It is a path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-03 20:52:41 +02:00
co-authored by Claude Opus 5
parent 8712160adb
commit 6ae4cfc9e5
+3 -2
View File
@@ -22,12 +22,13 @@ void print_usage() {
logger.Info("Available options:");
logger.Info("-T | --tcp Use raw TCP/IP instead of ZeroMQ");
logger.Info("-j<int> | --nproc=<int> Number of forks (only with -T)");
logger.Info("-d<int> | --root_dir=<int> Root directory for file writing");
logger.Info("-d<path>| --root_dir=<path> Root directory for file writing");
logger.Info("-r<int> | --zmq_repub_port=<int> ZeroMQ port for PUSH socket to republish images");
logger.Info("-f<int> | --zmq_file_port=<int> ZeroMQ port for PUB socket to inform about finalized files");
logger.Info("-w<int> | --rcv_watermark=<int> Receiving ZeroMQ socket watermark (default = 100)");
logger.Info("-W<int> | --repub_watermark=<int> Republish ZeroMQ socket watermark (default = 1000)");
logger.Info("-v | --verbose Verbose output");
logger.Info("-h This message");
logger.Info("");
}
@@ -80,7 +81,7 @@ int main(int argc, char **argv) {
{"zmq_file_port", required_argument, 0, 'f'},
{"rcv_watermark", required_argument, 0, 'w'},
{"repub_watermark", required_argument, 0, 'W'},
{"verbose", required_argument, 0, 'v'},
{"verbose", no_argument, 0, 'v'},
{"tcp", no_argument, 0, 'T'},
{"nproc", required_argument, 0, 'j'},
{0, 0, 0, 0}