mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-02-05 22:54:09 +00:00
swtpm_localca: Exit with error code 1 on unknown option
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
f1d425b5c1
commit
79e4c44c04
@ -555,7 +555,7 @@ static void usage(const char *prgname)
|
||||
"--tpm2 Generate a certificate for a TPM 2\n"
|
||||
"--allow-signing The TPM 2's EK can be used for signing\n"
|
||||
"--decryption The TPM 2's EK can be used for decryption\n"
|
||||
"--help, -h, -? Display this help screen and exit\n"
|
||||
"--help, -h Display this help screen and exit\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"The following environment variables are supported:\n"
|
||||
@ -674,7 +674,8 @@ int main(int argc, char *argv[])
|
||||
case '?':
|
||||
case 'h': /* --help */
|
||||
usage(argv[0]);
|
||||
ret = 0;
|
||||
if (opt == 'h')
|
||||
ret = 0;
|
||||
goto out;
|
||||
default:
|
||||
fprintf(stderr, "Unknown option code %d\n", opt);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user