summaryrefslogtreecommitdiff
path: root/src/shared/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-09 18:16:54 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-09 18:16:54 +0100
commit32802361561403cb6441198c82d9c499e0513863 (patch)
tree20b5f2998d56b2b7a2b801cad42fc0ca74c907c5 /src/shared/util.c
parent7dcd79c295fb1f4bcdda5ead43739acf34100ef8 (diff)
sd-bus: get rid of PID starttime concept
As kdbus no longer exports this, remove all traces from sd-bus too
Diffstat (limited to 'src/shared/util.c')
-rw-r--r--src/shared/util.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index f01cdd745..8c1cf52c0 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -618,56 +618,6 @@ int get_parent_of_pid(pid_t pid, pid_t *_ppid) {
return 0;
}
-int get_starttime_of_pid(pid_t pid, unsigned long long *st) {
- int r;
- _cleanup_free_ char *line = NULL;
- const char *p;
-
- assert(pid >= 0);
- assert(st);
-
- p = procfs_file_alloca(pid, "stat");
- r = read_one_line_file(p, &line);
- if (r < 0)
- return r;
-
- /* Let's skip the pid and comm fields. The latter is enclosed
- * in () but does not escape any () in its value, so let's
- * skip over it manually */
-
- p = strrchr(line, ')');
- if (!p)
- return -EIO;
-
- p++;
-
- if (sscanf(p, " "
- "%*c " /* state */
- "%*d " /* ppid */
- "%*d " /* pgrp */
- "%*d " /* session */
- "%*d " /* tty_nr */
- "%*d " /* tpgid */
- "%*u " /* flags */
- "%*u " /* minflt */
- "%*u " /* cminflt */
- "%*u " /* majflt */
- "%*u " /* cmajflt */
- "%*u " /* utime */
- "%*u " /* stime */
- "%*d " /* cutime */
- "%*d " /* cstime */
- "%*d " /* priority */
- "%*d " /* nice */
- "%*d " /* num_threads */
- "%*d " /* itrealvalue */
- "%llu " /* starttime */,
- st) != 1)
- return -EIO;
-
- return 0;
-}
-
int fchmod_umask(int fd, mode_t m) {
mode_t u;
int r;