From ee379181d3b6b89c23a660d027caa9c2d027aa7d Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 19 Dec 2014 00:28:04 +0100 Subject: Update systemd support from several GSD commits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Msg: Backout change from using free() to g_free() in systemd patch Commit: f1f7bddf007c950608f5f8c5a771a7fb2ab187d5 From: Chris Kühl Msg: Require systemd 38 or greater when using --enable-systemd Commit: ff551c6974cfa0801a368ee5c2406ce941ac8cab From: Chris Kühl Msg: build: Disallow building with systemd v43 due to C++ incompatibility Commit: 8a17cd6ff6b0ab4979c6ed8426724ce355d23679 From: Chris Kühl Msg: Check for logind, not for systemd Commit: 4cf87daa48a8ab606afe5e3c2ac54c8f6276ba98 From: Martin Pitt --- src/procdialogs.cpp | 6 +----- src/proctable.cpp | 5 ++--- src/util.h | 3 +++ 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp index 7d7aace..95b2527 100644 --- a/src/procdialogs.cpp +++ b/src/procdialogs.cpp @@ -25,10 +25,6 @@ #include #include -#ifdef HAVE_SYSTEMD -#include -#endif - #include "procdialogs.h" #include "proctable.h" #include "callbacks.h" @@ -479,7 +475,7 @@ create_field_page(GtkWidget *tree, const char* text) column_id == COL_SEAT || column_id == COL_OWNER) #ifdef HAVE_SYSTEMD - && sd_booted() <= 0 + && !LOGIND_RUNNING() #endif ) continue; diff --git a/src/proctable.cpp b/src/proctable.cpp index 25b1f36..20f0db5 100644 --- a/src/proctable.cpp +++ b/src/proctable.cpp @@ -45,7 +45,6 @@ #include #ifdef HAVE_SYSTEMD -#include #include #endif @@ -488,7 +487,7 @@ proctable_new (ProcData * const procdata) } #ifdef HAVE_SYSTEMD - if (sd_booted() <= 0) + if (!LOGIND_RUNNING()) #endif { GtkTreeViewColumn *column; @@ -756,7 +755,7 @@ get_process_systemd_info(ProcInfo *info) #ifdef HAVE_SYSTEMD uid_t uid; - if (sd_booted() <= 0) + if (!LOGIND_RUNNING()) return; free(info->unit); diff --git a/src/util.h b/src/util.h index 22a9a14..26aed19 100644 --- a/src/util.h +++ b/src/util.h @@ -28,6 +28,9 @@ inline int procman_cmp(T x, T y) #define PROCMAN_CMP(X, Y) procman_cmp((X), (Y)) #define PROCMAN_RCMP(X, Y) procman_cmp((Y), (X)); +/* check if logind is running */ +#define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0) + GtkWidget* procman_make_label_for_mmaps_or_ofiles(const char *format, const char *process_name, -- cgit v1.2.1