various: attach errno to structured logs, even if not used in msg

This commit is contained in:
Mike Yuan
2026-07-25 19:37:47 +09:00
committed by Yu Watanabe
parent 8c98dac0dc
commit c2624fe9a7
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ static int smbios_query(void) {
_cleanup_free_ char *modalias = NULL;
r = smbios_get_modalias(&modalias);
if (r == -ENOENT) {
log_debug("No DMI device found, assuming IMDS is not available.");
log_debug_errno(r, "No DMI device found, assuming IMDS is not available.");
return false;
}
if (r < 0)
+1 -1
View File
@@ -927,7 +927,7 @@ static int event_log_load_firmware(EventLog *el) {
r = read_full_file(path, (char**) &buf, &bufsize);
if (r == -ENOENT) {
log_notice("No '%s' file, assuming TPM without firmware support.", path);
log_notice_errno(r, "No '%s' file, assuming TPM without firmware support.", path);
return 0;
}
if (r < 0)
+1 -1
View File
@@ -92,7 +92,7 @@ static int generate_swtpm_symlink(Tpm2Support support) {
r = find_executable("swtpm", /* ret_filename= */ NULL);
if (r == -ENOENT) {
log_warning("TPM software fallback requested but swtpm not available, not pulling in software TPM unit.");
log_warning_errno(r, "TPM software fallback requested but swtpm not available, not pulling in software TPM unit.");
return 0;
}
if (r < 0)