From: Yu Watanabe Date: Fri, 22 Mar 2024 08:46:00 +0000 (+0900) Subject: journalctl-filter: use add_match_boot_id() instead of add_match_this_boot() X-Git-Tag: v256-rc1~368 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af41f9f8adf79bd477aacbf43da4088c90a242d9;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/journal/journalctl-filter.c b/src/journal/journalctl-filter.c index 3129e776769..5f6118f586e 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) {