diff options
author | Mark Wong <markwkm@gmail.com> | 2013-03-27 16:54:49 -0700 |
---|---|---|
committer | Mark Wong <markwkm@gmail.com> | 2013-03-27 16:54:49 -0700 |
commit | ef7ca10ac3149bff0028792eb522e77e10c7f0ba (patch) | |
tree | 7f80a58544cbfd79b7b2423f5e9f0569b9c20444 | |
parent | 0d9ef3a7a42690590e37cd9a93252e135f6b781b (diff) |
Current query only for linux
Disable the mode toggling for getting the current query until it can be
implemented on platforms other than linux.
-rw-r--r-- | machine.h | 5 | ||||
-rw-r--r-- | pg_top.c | 9 |
2 files changed, 14 insertions, 0 deletions
@@ -95,8 +95,13 @@ struct process_select /* routines defined by the machine dependent module */ int machine_init(struct statics *); void get_system_info(struct system_info *); +#ifdef __linux__ caddr_t get_process_info(struct system_info *, struct process_select *, int, char *, int); +#else +caddr_t get_process_info(struct system_info *, struct process_select *, int, + char *); +#endif /* __linux__ */ char *format_header(char *); char *format_next_io(caddr_t, char *(*) (uid_t)); char *format_next_process(caddr_t, char *(*) (uid_t)); @@ -789,7 +789,11 @@ Usage: %s [-ITWbcinqru] [-x x] [-s x] [-o field] [-z username]\n\ if (mode_remote == 0) { get_system_info(&system_info); +#ifdef __linux__ (void) get_process_info(&system_info, &ps, 0, conninfo, mode); +#else + (void) get_process_info(&system_info, &ps, 0, conninfo); +#endif /* __linux__ */ } else { @@ -823,8 +827,13 @@ Usage: %s [-ITWbcinqru] [-x x] [-s x] [-o field] [-z username]\n\ if (mode_remote == 0) { get_system_info(&system_info); +#ifdef __linux__ processes = get_process_info(&system_info, &ps, tmp_index, conninfo, mode); +#else + processes = get_process_info(&system_info, &ps, tmp_index, + conninfo); +#endif /* __linux__ */ } else { |