Skip to content

Commit

Permalink
tpm2_getrandom: Fix --force parameter
Browse files Browse the repository at this point in the history
The --force parameter did require an argument but was always set
to true if used. Now no_argument is used in the option table.

Signed-off-by: Juergen Repp <juergen_repp@web.de>
  • Loading branch information
JuergenReppSIT authored and AndreasFuchsTPM committed Feb 5, 2025
1 parent 3613b96 commit b1a06df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/tpm2_getrandom.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ static bool tpm2_tool_onstart(tpm2_options **opts) {

const struct option topts[] = {
{ "output", required_argument, NULL, 'o' },
{ "force", required_argument, NULL, 'f' },
{ "force", no_argument, NULL, 'f' },
{ "hex", no_argument, NULL, 0 },
{ "session", required_argument, NULL, 'S' },
{ "cphash", required_argument, NULL, 1 },
Expand Down

0 comments on commit b1a06df

Please sign in to comment.