From f07e81d9c2e23eae71f70138ece321091bfc5fad Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Fri, 2 Oct 2020 14:54:02 +0200 Subject: [PATCH] Show usage and exit non-zero for unsupported option in cluster Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- cmd/gvmap/cluster.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/gvmap/cluster.c b/cmd/gvmap/cluster.c index 7c4c5c19d..bf97ace4b 100644 --- a/cmd/gvmap/cluster.c +++ b/cmd/gvmap/cluster.c @@ -123,9 +123,9 @@ static void init(int argc, char *argv[], opts_t* opts) { if (optopt == '?') usage(cmd, 0); else { - fprintf(stderr, " option -%c unrecognized - ignored\n", + fprintf(stderr, " option -%c unrecognized\n", optopt); - usage(cmd, 0); + usage(cmd, 1); } break; } -- 2.40.0