2 changes: 1 addition & 1 deletion tools/tpm2_rc_decode.c
Expand Up @@ -244,7 +244,7 @@ static bool on_arg(int argc, char **argv) {

bool tpm2_tool_onstart(tpm2_options **opts) {

*opts = tpm2_options_new(NULL, 0, NULL, NULL, on_arg, true);
*opts = tpm2_options_new(NULL, 0, NULL, NULL, on_arg, TPM2_OPTIONS_SHOW_USAGE);

return *opts != NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_readpublic.c
Expand Up @@ -137,7 +137,7 @@ bool tpm2_tool_onstart(tpm2_options **opts) {
};

*opts = tpm2_options_new("H:o:c:f:", ARRAY_LEN(topts), topts,
on_option, NULL, true);
on_option, NULL, TPM2_OPTIONS_SHOW_USAGE);

return *opts != NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_rsadecrypt.c
Expand Up @@ -159,7 +159,7 @@ bool tpm2_tool_onstart(tpm2_options **opts) {
};

*opts = tpm2_options_new("k:P:I:o:c:S:", ARRAY_LEN(topts), topts,
on_option, NULL, true);
on_option, NULL, TPM2_OPTIONS_SHOW_USAGE);

return *opts != NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_rsaencrypt.c
Expand Up @@ -135,7 +135,7 @@ bool tpm2_tool_onstart(tpm2_options **opts) {
};

*opts = tpm2_options_new("k:o:c:", ARRAY_LEN(topts), topts,
on_option, on_args, true);
on_option, on_args, TPM2_OPTIONS_SHOW_USAGE);

return *opts != NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_send.c
Expand Up @@ -158,7 +158,7 @@ bool tpm2_tool_onstart(tpm2_options **opts) {
};

*opts = tpm2_options_new("o:", ARRAY_LEN(topts), topts,
on_option, on_args, false);
on_option, on_args, 0);

ctx.input = stdin;
ctx.output = stdout;
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_sign.c
Expand Up @@ -285,7 +285,7 @@ bool tpm2_tool_onstart(tpm2_options **opts) {
};

*opts = tpm2_options_new("k:P:g:m:D:t:s:c:S:f:", ARRAY_LEN(topts), topts,
on_option, NULL, true);
on_option, NULL, TPM2_OPTIONS_SHOW_USAGE);

return *opts != NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_startauthsession.c
Expand Up @@ -95,7 +95,7 @@ bool tpm2_tool_onstart(tpm2_options **opts) {
};

*opts = tpm2_options_new("ag:S:", ARRAY_LEN(topts), topts, on_option,
NULL, false);
NULL, 0);

return *opts != NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_startup.c
Expand Up @@ -71,7 +71,7 @@ bool tpm2_tool_onstart(tpm2_options **opts) {
};

*opts = tpm2_options_new("cs", ARRAY_LEN(topts), topts,
on_option, NULL, false);
on_option, NULL, 0);

return *opts != NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_tool.c
Expand Up @@ -111,7 +111,7 @@ int main(int argc, char *argv[], char *envp[]) {
}
}

if (argc == 1 && tool_opts && tool_opts->show_usage) {
if (argc == 1 && tool_opts && (tool_opts->flags & TPM2_OPTIONS_SHOW_USAGE)) {
tpm2_print_usage(argv[0], tool_opts);
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_unseal.c
Expand Up @@ -218,7 +218,7 @@ bool tpm2_tool_onstart(tpm2_options **opts) {
};

*opts = tpm2_options_new("H:P:o:c:S:L:F:", ARRAY_LEN(topts), topts,
on_option, NULL, true);
on_option, NULL, TPM2_OPTIONS_SHOW_USAGE);

return *opts != NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/tpm2_verifysignature.c
Expand Up @@ -267,7 +267,7 @@ bool tpm2_tool_onstart(tpm2_options **opts) {


*opts = tpm2_options_new("k:g:m:D:rs:t:c:", ARRAY_LEN(topts), topts,
on_option, NULL, true);
on_option, NULL, TPM2_OPTIONS_SHOW_USAGE);

return *opts != NULL;
}
Expand Down