]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
various: attach errno to structured logs, even if not used in msg 43148/head
authorMike Yuan <me@yhndnzj.com>
Thu, 26 Mar 2026 16:12:43 +0000 (17:12 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 Jul 2026 10:37:47 +0000 (19:37 +0900)
src/imds/imds-generator.c
src/pcrlock/pcrlock.c
src/tpm2-setup/tpm2-generator.c

index ccef9fa36c0cce17f9cefdb4994350558754feb1..08175df3e58f9da3c190d5ae215450f0e027a962 100644 (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)
index ecb0bb30e6b3d687fecbb2200074fc9010b9b36c..33b35ac4142305727a21fba9bed6055845ee3871 100644 (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)
index 7a826a0be183d0305690825dc218852f769d315e..6c27fa106af879ff5041d2944c18ae71d80d2714 100644 (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)