richardphibel / rpms / systemd

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