]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journalctl-filter: use add_match_boot_id() instead of add_match_this_boot()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 22 Mar 2024 08:46:00 +0000 (17:46 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 28 Mar 2024 12:28:17 +0000 (12:28 +0000)
The function add_match_this_boot() calls sd_journal_add_conjunction(),
hence, we cannot specify multiple devices in the extra match arguments,
e.g., "journalctl /dev/sda /dev/sdb" shows no entry.

src/journal/journalctl-filter.c

index 3129e776769281484792b0d0d8cdb9a40c8775b6..5f6118f586e163367baa4b37797fd9a6bc05eb30 100644 (file)
@@ -385,11 +385,7 @@ get_parent:
                         break;
         }
 
-        r = add_match_this_boot(j, arg_machine);
-        if (r < 0)
-                return log_error_errno(r, "Failed to add match for the current boot: %m");
-
-        return 0;
+        return add_match_boot_id(j, SD_ID128_NULL);
 }
 
 static int add_matches_for_path(sd_journal *j, const char *path) {