ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
1abbee
From fb7acf90df3d675261b18f8e7c2de315dadee756 Mon Sep 17 00:00:00 2001
1abbee
From: Michal Sekletar <msekleta@redhat.com>
1abbee
Date: Wed, 3 Feb 2016 11:22:52 +0100
1abbee
Subject: [PATCH] journalctl: add match for the current boot when called with
1abbee
 devpath
1abbee
1abbee
Cherry-picked from: 485fd9a7b9d59b9f2302a873f7ee5ccac256dd93
1abbee
Related: #947636
1abbee
---
1abbee
 src/journal/journalctl.c | 4 ++++
1abbee
 1 file changed, 4 insertions(+)
1abbee
1abbee
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
c62b8e
index 3db1cd24ef..6948ed689d 100644
1abbee
--- a/src/journal/journalctl.c
1abbee
+++ b/src/journal/journalctl.c
1abbee
@@ -207,6 +207,10 @@ static int add_matches_for_device(sd_journal *j, const char *devpath) {
1abbee
                 d = udev_device_get_parent(d);
1abbee
         }
1abbee
 
1abbee
+        r = add_match_this_boot(j, arg_machine);
1abbee
+        if (r < 0)
1abbee
+                return log_error_errno(r, "Failed to add match for the current boot: %m");
1abbee
+
1abbee
         return 0;
1abbee
 }
1abbee