summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-04 15:35:30 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-04 15:35:30 +0100
commit94fb446e55babb713fb24850455627acf30d999b (patch)
treeb69d30f7e36ce6b288fb3df5f2d699c83a1f835e /src/login
parente91af489a25e8bb65016a63f533ae28a505119ef (diff)
journald: store _SYSTEMD_UNIT= instead of _SYSTEMD_SERVICE= field, since processes might also be related to mount, swap or socket units, not just services
Diffstat (limited to 'src/login')
-rw-r--r--src/login/libsystemd-login.sym2
-rw-r--r--src/login/sd-login.c6
-rw-r--r--src/login/sd-login.h6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/login/libsystemd-login.sym b/src/login/libsystemd-login.sym
index bac46f4064..15e505e83b 100644
--- a/src/login/libsystemd-login.sym
+++ b/src/login/libsystemd-login.sym
@@ -36,5 +36,5 @@ local:
LIBSYSTEMD_LOGIN_38 {
global:
- sd_pid_get_service;
+ sd_pid_get_unit;
} LIBSYSTEMD_LOGIN_31;
diff --git a/src/login/sd-login.c b/src/login/sd-login.c
index e857ae08d2..8893b1de80 100644
--- a/src/login/sd-login.c
+++ b/src/login/sd-login.c
@@ -121,11 +121,11 @@ _public_ int sd_pid_get_session(pid_t pid, char **session) {
return 0;
}
-_public_ int sd_pid_get_service(pid_t pid, char **service) {
+_public_ int sd_pid_get_unit(pid_t pid, char **unit) {
int r;
char *cgroup, *p;
- if (!service)
+ if (!unit)
return -EINVAL;
r = pid_get_cgroup(pid, NULL, &cgroup);
@@ -144,7 +144,7 @@ _public_ int sd_pid_get_service(pid_t pid, char **service) {
if (!p)
return -ENOMEM;
- *service = p;
+ *unit = p;
return 0;
}
diff --git a/src/login/sd-login.h b/src/login/sd-login.h
index 1d8a55e906..00de6716b0 100644
--- a/src/login/sd-login.h
+++ b/src/login/sd-login.h
@@ -53,9 +53,9 @@ int sd_pid_get_session(pid_t pid, char **session);
* return an error for system processes. */
int sd_pid_get_owner_uid(pid_t pid, uid_t *uid);
-/* Get service name from PID. This will return an error for
- * non-service processes. */
-int sd_pid_get_service(pid_t, char **service);
+/* Get systemd unit (i.e. service) name from PID. This will return an
+ * error for non-service processes. */
+int sd_pid_get_unit(pid_t, char **unit);
/* Get state from uid. Possible states: offline, lingering, online, active */
int sd_uid_get_state(uid_t uid, char**state);