From af41f9f8adf79bd477aacbf43da4088c90a242d9 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 22 Mar 2024 17:46:00 +0900 Subject: [PATCH] journalctl-filter: use add_match_boot_id() instead of add_match_this_boot() 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 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/journal/journalctl-filter.c b/src/journal/journalctl-filter.c index 3129e77676..5f6118f586 100644 --- a/src/journal/journalctl-filter.c +++ b/src/journal/journalctl-filter.c @@ -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) { -- 2.25.1