From 937b210551ef7c243976f0c0240395827a72ef8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alejandro=20Pi=C3=B1eiro?= Date: Thu, 4 Jan 2018 16:38:00 +0100 Subject: [PATCH] glsl/standalone: point which arguments are mandatory Every now and then I execute the standalone compiler, get the non-version error, and need to remember what I'm doing wrong Reviewed-by: Ian Romanick --- src/compiler/glsl/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/main.cpp b/src/compiler/glsl/main.cpp index 123e41f9dcc..e082bd69757 100644 --- a/src/compiler/glsl/main.cpp +++ b/src/compiler/glsl/main.cpp @@ -62,7 +62,10 @@ usage_fail(const char *name) "Possible options are:\n"; printf(header, name); for (const struct option *o = compiler_opts; o->name != 0; ++o) { - printf(" --%s\n", o->name); + printf(" --%s", o->name); + if (o->has_arg == required_argument) + printf(" (mandatory)"); + printf("\n"); } exit(EXIT_FAILURE); } -- 2.30.2