From: Dan Streetman Date: Mon, 2 Oct 2023 20:25:10 +0000 (-0400) Subject: tpm2: edit tpm2_get_or_create_srk() comment X-Git-Tag: v255-rc1~355 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ed342562ada6198f24760b21634273181a2d4df;p=thirdparty%2Fsystemd.git tpm2: edit tpm2_get_or_create_srk() comment Adjust the comment to correct the return value, i.e. 1 for SRK created, 0 for SRK already exists, <0 on error. --- diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c index 3374bd4f783..4060617f3f0 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c @@ -1174,7 +1174,8 @@ static int tpm2_get_srk( return tpm2_index_to_handle(c, TPM2_SRK_HANDLE, session, ret_public, ret_name, ret_qname, ret_handle); } -/* Get the SRK, creating one if needed. Returns 0 on success, or < 0 on error. */ +/* Get the SRK, creating one if needed. Returns 1 if a new SRK was created and persisted, 0 if an SRK already + * exists, or < 0 on error. */ int tpm2_get_or_create_srk( Tpm2Context *c, const Tpm2Handle *session,