richardphibel / rpms / systemd

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