summaryrefslogtreecommitdiff
path: root/src/shared
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
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')
-rw-r--r--src/shared/util.c50
-rw-r--r--src/shared/util.h1
2 files changed, 0 insertions, 51 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index f01cdd7451..8c1cf52c0a 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;
diff --git a/src/shared/util.h b/src/shared/util.h
index 0b7c77b1d4..b6fdf83302 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -263,7 +263,6 @@ const char* split(const char **state, size_t *l, const char *separator, bool quo
for ((state) = (s), (word) = split(&(state), &(length), (separator), (quoted)); (word); (word) = split(&(state), &(length), (separator), (quoted)))
pid_t get_parent_of_pid(pid_t pid, pid_t *ppid);
-int get_starttime_of_pid(pid_t pid, unsigned long long *st);
char *strappend(const char *s, const char *suffix);
char *strnappend(const char *s, const char *suffix, size_t length);