[systemd-commits] 2 commits - Makefile.am src/shared TODO

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Mon Sep 30 15:05:56 PDT 2013


 Makefile.am            |    1 +
 TODO                   |    3 ---
 src/shared/logs-show.c |   22 ++++++++++++++++++++++
 3 files changed, 23 insertions(+), 3 deletions(-)

New commits:
commit 69ae3ee07ee4dc7592f6d2d5f181b478a772a644
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Mon Sep 30 23:58:44 2013 +0200

    logs-show.c: show all messages for a slice

diff --git a/TODO b/TODO
index df4813c..c1f6e5a 100644
--- a/TODO
+++ b/TODO
@@ -60,9 +60,6 @@ Features:
 
 * libdsystemd-bus should expose utf8 validation calls
 
-* When using "systemd status" on a slice unit also show all messages
-  matching _SYSTEMD_SLICE= not just _SYSTEMD_UNIT=
-
 * After coming back from hibernation reset hibernation swap partition
 
 * If we try to find a unit via a dangling symlink generate a clean
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index 2dd5025..7bb19b4 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -1048,6 +1048,16 @@ int add_matches_for_unit(sd_journal *j, const char *unit) {
             (r = sd_journal_add_match(j, m4, 0))
         );
 
+        if (r == 0 && endswith(unit, ".slice")) {
+                char *m5 = strappend("_SYSTEMD_SLICE=", unit);
+
+                /* Show all messages belonging to a slice */
+                (void)(
+                        (r = sd_journal_add_disjunction(j)) ||
+                        (r = sd_journal_add_match(j, m5, 0))
+                        );
+        }
+
         return r;
 }
 
@@ -1087,6 +1097,18 @@ int add_matches_for_user_unit(sd_journal *j, const char *unit, uid_t uid) {
                 (r = sd_journal_add_match(j, muid, 0)) ||
                 (r = sd_journal_add_match(j, "_UID=0", 0))
         );
+
+        if (r == 0 && endswith(unit, ".slice")) {
+                char *m5 = strappend("_SYSTEMD_SLICE=", unit);
+
+                /* Show all messages belonging to a slice */
+                (void)(
+                        (r = sd_journal_add_disjunction(j)) ||
+                        (r = sd_journal_add_match(j, m5, 0)) ||
+                        (r = sd_journal_add_match(j, muid, 0))
+                        );
+        }
+
         return r;
 }
 

commit ceadabb102b05b237bfab11e1f742975ee4daeb1
Author: Michał Górny <mgorny at gentoo.org>
Date:   Mon Sep 30 10:08:09 2013 +0200

    build-sys: link libsystemd-login with libsystemd-label.la
    
    libsystemd-login.la uses cg_create() that currently seems to be a part
    of libsystemd-label.la. However, it doesn't link against that library
    and it seems that none of the (unconditional) libraries it uses do. In
    the end, people end up getting «undefined reference to `cg_create'»
    when trying to build e.g. dbus.

diff --git a/Makefile.am b/Makefile.am
index 92de163..af4e215 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3919,6 +3919,7 @@ libsystemd_login_la_LDFLAGS = \
 libsystemd_login_la_LIBADD = \
 	libsystemd-shared.la \
 	libsystemd-daemon-internal.la \
+	libsystemd-label.la \
 	$(RT_LIBS)
 
 libsystemd_login_internal_la_SOURCES = \



More information about the systemd-commits mailing list