]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DEV: flags: fix usage message to reflect available options
authorWilly Tarreau <w@1wt.eu>
Fri, 9 Sep 2022 12:16:49 +0000 (14:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Sep 2022 12:26:29 +0000 (14:26 +0200)
The proposed decoding options were not updated after the changes in 2.6,
let's fix that by taking the names from the existing declaration. This
should be backported to 2.6.

dev/flags/flags.c

index 733113da36fc58cd0923b0c47746e1352291c2cf..711f45121a34deb2e590b80c80f37eb3461063ac 100644 (file)
@@ -406,7 +406,14 @@ void show_strm_flags(unsigned int f)
 
 void usage_exit(const char *name)
 {
-       fprintf(stderr, "Usage: %s [ana|chn|conn|sc|si|sierr|strm|task|txn]* { [+-][0x]value* | - }\n", name);
+       int word, nbword;
+
+       fprintf(stderr, "Usage: %s [", name);
+
+       nbword = sizeof(show_as_words) / sizeof(*show_as_words);
+       for (word = 0; word < nbword; word++)
+               fprintf(stderr, "%s%s", word ? "|" : "", show_as_words[word]);
+       fprintf(stderr, "]* { [+-][0x]value* | - }\n");
        exit(1);
 }