1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

import-creds: when we hit ENOENT on SMBIOS 11 do not even debug log

We'll *always* hit ENEOENT when iterating through SMBIOS type #11
fields, on the last one. it's very confusing to debug log about that,
let's just not do it.

(cherry picked from commit 5202ee42d5)
This commit is contained in:
Lennart Poettering 2024-07-11 14:32:09 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 6a3cb4cd11
commit 995c702a34

View File

@ -595,9 +595,11 @@ static int import_credentials_smbios(ImportCredentialContext *c) {
return log_oom(); return log_oom();
r = read_virtual_file(p, sizeof(dmi_field_header) + CREDENTIALS_TOTAL_SIZE_MAX, (char**) &data, &size); r = read_virtual_file(p, sizeof(dmi_field_header) + CREDENTIALS_TOTAL_SIZE_MAX, (char**) &data, &size);
if (r == -ENOENT) /* Once we reach ENOENT there are no more DMI Type 11 fields around. */
break;
if (r < 0) { if (r < 0) {
/* Once we reach ENOENT there are no more DMI Type 11 fields around. */ /* Once we reach ENOENT there are no more DMI Type 11 fields around. */
log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_WARNING, r, "Failed to open '%s', ignoring: %m", p); log_warning_errno(r, "Failed to open '%s', ignoring: %m", p);
break; break;
} }