Merge pull request #28428 from ldv-alt/ERRNO_IS

treewide: cleanup use of ERRNO_IS_*(r)
This commit is contained in:
Luca Boccassi
2023-07-30 16:31:16 +01:00
committed by GitHub
18 changed files with 188 additions and 150 deletions
+4 -3
View File
@@ -1728,10 +1728,11 @@ static int attach_luks_or_plain_or_bitlk_by_tpm2(
found_some
? "No TPM2 metadata matching the current system state found in LUKS2 header, falling back to traditional unlocking."
: "No TPM2 metadata enrolled in LUKS2 header, falling back to traditional unlocking.");
if (ERRNO_IS_NOT_SUPPORTED(r)) /* TPM2 support not compiled in? */
return log_debug_errno(SYNTHETIC_ERRNO(EAGAIN), "TPM2 support not available, falling back to traditional unlocking.");
if (r < 0)
if (r < 0) {
if (ERRNO_IS_NOT_SUPPORTED(r)) /* TPM2 support not compiled in? */
return log_debug_errno(SYNTHETIC_ERRNO(EAGAIN), "TPM2 support not available, falling back to traditional unlocking.");
return r;
}
found_some = true;