various: attach errno to structured logs, even if not used in msg
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user