diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2001-10-01 16:43:04 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2001-10-01 16:43:04 +0000 |
commit | c29a65d62db277a0c191d09527d5ffdf1cf00136 (patch) | |
tree | d37500dca9f726f909938880b083803ce8310188 /libps | |
parent | 4d938ee327be3f4cd049dc431b994e99a90f74e6 (diff) |
2001-10-01 Marcus Brinkmann <marcus@gnu.org>
* filters.c (ps_own_filter): Add const to type.
(ps_not_leader_filter): Likewise.
(ps_unorphaned_filter): Likewise.
(ps_ctty_filter): Likewise.
(ps_parent_filter): Likewise.
(ps_alive_filter): Likewise.
Submitted by Maurizio Boriani <baux@debian.org>.
Diffstat (limited to 'libps')
-rw-r--r-- | libps/ChangeLog | 10 | ||||
-rw-r--r-- | libps/filters.c | 12 |
2 files changed, 16 insertions, 6 deletions
diff --git a/libps/ChangeLog b/libps/ChangeLog index 3a3f6906..b66f4097 100644 --- a/libps/ChangeLog +++ b/libps/ChangeLog @@ -1,3 +1,13 @@ +2001-10-01 Marcus Brinkmann <marcus@gnu.org> + + * filters.c (ps_own_filter): Add const to type. + (ps_not_leader_filter): Likewise. + (ps_unorphaned_filter): Likewise. + (ps_ctty_filter): Likewise. + (ps_parent_filter): Likewise. + (ps_alive_filter): Likewise. + Submitted by Maurizio Boriani <baux@debian.org>. + 2001-03-29 Neal H Walfield <neal@cs.uml.edu> * host.c: Fix comments. diff --git a/libps/filters.c b/libps/filters.c index 4fac0390..6663e61e 100644 --- a/libps/filters.c +++ b/libps/filters.c @@ -38,7 +38,7 @@ ps_own_p (struct proc_stat *ps) own_uid = getuid (); return own_uid >= 0 && own_uid == proc_stat_owner_uid (ps); } -struct ps_filter ps_own_filter = +const struct ps_filter ps_own_filter = {"own", PSTAT_OWNER_UID, ps_own_p}; static int @@ -47,7 +47,7 @@ ps_not_leader_p (struct proc_stat *ps) return !(proc_stat_state (ps) & (PSTAT_STATE_P_SESSLDR | PSTAT_STATE_P_LOGINLDR)); } -struct ps_filter ps_not_leader_filter = +const struct ps_filter ps_not_leader_filter = {"not-sess-leader", PSTAT_STATE, ps_not_leader_p}; static int @@ -58,7 +58,7 @@ ps_unorphaned_p (struct proc_stat *ps) !(state & PSTAT_STATE_P_ORPHAN) || (state & (PSTAT_STATE_P_SESSLDR | PSTAT_STATE_P_LOGINLDR)); } -struct ps_filter ps_unorphaned_filter = +const struct ps_filter ps_unorphaned_filter = {"unorphaned", PSTAT_STATE, ps_unorphaned_p}; static int @@ -66,7 +66,7 @@ ps_ctty_p (struct proc_stat *ps) { return proc_stat_cttyid (ps) != MACH_PORT_NULL; } -struct ps_filter ps_ctty_filter = +const struct ps_filter ps_ctty_filter = {"ctty", PSTAT_CTTYID, ps_ctty_p}; static int @@ -74,7 +74,7 @@ ps_parent_p (struct proc_stat *ps) { return !(proc_stat_state (ps) & PSTAT_STATE_P_NOPARENT); } -struct ps_filter ps_parent_filter = +const struct ps_filter ps_parent_filter = {"parent", PSTAT_STATE, ps_parent_p}; static int @@ -87,5 +87,5 @@ ps_alive_p (struct proc_stat *ps) proc_stat_set_flags (ps, test_flag); return proc_stat_has (ps, test_flag); } -struct ps_filter ps_alive_filter = +const struct ps_filter ps_alive_filter = {"alive", 0, ps_alive_p}; |