diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-09-01 10:19:49 +0000 |
---|---|---|
committer | Thomas Schwinge <thomas@schwinge.name> | 2010-09-14 17:09:47 +0200 |
commit | 8dc9884fc74243a6810fdcac603e1941962b666a (patch) | |
tree | bfc25f31bb2f4c87f51965aba7d4d411074d7a75 /rootdir.c | |
parent | 5c7310fd853620627b57c72ddcc3b212f29f6056 (diff) |
Use the user-provided kernel PID for uptime
* rootdir.c (get_boottime, get_idletime): replace KERNEL_PID with the
opt_kernel_pid command-line option.
* main.c (argp): Document the change.
Diffstat (limited to 'rootdir.c')
-rw-r--r-- | rootdir.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -38,8 +38,6 @@ using them would require locking and as a consequence it would be more complicated, not simpler. */ -#define KERNEL_PID 2 - /* Helper functions */ @@ -50,7 +48,7 @@ get_boottime (struct ps_context *pc, struct timeval *tv) struct proc_stat *ps; error_t err; - err = _proc_stat_create (KERNEL_PID, pc, &ps); + err = _proc_stat_create (opt_kernel_pid, pc, &ps); if (err) return err; @@ -78,7 +76,7 @@ get_idletime (struct ps_context *pc, struct timeval *tv) error_t err; int i; - err = _proc_stat_create (KERNEL_PID, pc, &ps); + err = _proc_stat_create (opt_kernel_pid, pc, &ps); if (err) return err; |