cope with sysctl.h changes
This commit is contained in:
parent
9ab0fd82a4
commit
40f5f67190
@ -1,7 +1,15 @@
|
||||
$OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
--- machine/m_openbsd.c.orig Sat Apr 5 18:09:06 2008
|
||||
+++ machine/m_openbsd.c Tue Jul 10 08:26:42 2012
|
||||
@@ -51,13 +51,13 @@
|
||||
$OpenBSD: patch-machine_m_openbsd_c,v 1.3 2012/12/18 21:38:12 sthen Exp $
|
||||
--- machine/m_openbsd.c.orig Sat Apr 5 11:09:06 2008
|
||||
+++ machine/m_openbsd.c Thu Dec 6 15:30:59 2012
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#include <sys/proc.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/dkstat.h>
|
||||
#include <sys/swap.h>
|
||||
@@ -51,13 +52,13 @@
|
||||
#include "loadavg.h"
|
||||
|
||||
static long swapmode(long *, long *);
|
||||
@ -18,7 +26,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
int remaining; /* number of pointers remaining */
|
||||
};
|
||||
|
||||
@@ -138,8 +138,8 @@ int (*proc_compares[]) () =
|
||||
@@ -138,8 +139,8 @@ int (*proc_compares[]) () =
|
||||
static int nproc;
|
||||
static int onproc = -1;
|
||||
static int pref_len;
|
||||
@ -29,7 +37,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
|
||||
/* these are for getting the memory statistics */
|
||||
static int pageshift; /* log base 2 of the pagesize */
|
||||
@@ -312,7 +312,7 @@ get_process_info(struct system_info *si, struct proces
|
||||
@@ -312,7 +313,7 @@ get_process_info(struct system_info *si, struct proces
|
||||
{
|
||||
int show_idle, show_system, show_threads, show_uid, show_cmd;
|
||||
int total_procs, active_procs;
|
||||
@ -38,7 +46,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
int mib[6];
|
||||
size_t size;
|
||||
|
||||
@@ -320,11 +320,11 @@ get_process_info(struct system_info *si, struct proces
|
||||
@@ -320,11 +321,11 @@ get_process_info(struct system_info *si, struct proces
|
||||
PGconn *pgconn;
|
||||
PGresult *pgresult = NULL;
|
||||
|
||||
@ -53,7 +61,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
mib[5] = 1;
|
||||
|
||||
nproc = 0;
|
||||
@@ -333,14 +333,14 @@ get_process_info(struct system_info *si, struct proces
|
||||
@@ -333,14 +334,14 @@ get_process_info(struct system_info *si, struct proces
|
||||
{
|
||||
pgresult = PQexec(pgconn, QUERY_PROCESSES);
|
||||
nproc = PQntuples(pgresult);
|
||||
@ -72,7 +80,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
if (pref == NULL) {
|
||||
warnx("Out of memory.");
|
||||
quit(23);
|
||||
@@ -392,9 +392,9 @@ get_process_info(struct system_info *si, struct proces
|
||||
@@ -392,9 +393,9 @@ get_process_info(struct system_info *si, struct proces
|
||||
}
|
||||
|
||||
/* if requested, sort the "interesting" processes */
|
||||
@ -84,7 +92,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
/* remember active and total counts */
|
||||
si->p_total = total_procs;
|
||||
si->p_active = pref_len = active_procs;
|
||||
@@ -408,7 +408,7 @@ get_process_info(struct system_info *si, struct proces
|
||||
@@ -408,7 +409,7 @@ get_process_info(struct system_info *si, struct proces
|
||||
char fmt[MAX_COLS]; /* static area where result is built */
|
||||
|
||||
static char *
|
||||
@ -93,7 +101,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
{
|
||||
static char buf[10];
|
||||
|
||||
@@ -422,7 +422,7 @@ state_abbr(struct kinfo_proc2 *pp)
|
||||
@@ -422,7 +423,7 @@ state_abbr(struct kinfo_proc2 *pp)
|
||||
}
|
||||
|
||||
static char *
|
||||
@ -102,7 +110,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
{
|
||||
#define ARG_SIZE 60
|
||||
static char **s, buf[ARG_SIZE];
|
||||
@@ -457,7 +457,7 @@ char *
|
||||
@@ -457,7 +458,7 @@ char *
|
||||
format_next_process(caddr_t handle, char *(*get_userid)(uid_t))
|
||||
{
|
||||
char *p_wait, waddr[sizeof(void *) * 2 + 3]; /* Hexify void pointer */
|
||||
@ -111,7 +119,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
struct handle *hp;
|
||||
int cputime;
|
||||
double pct;
|
||||
@@ -477,7 +477,7 @@ format_next_process(caddr_t handle, char *(*get_userid
|
||||
@@ -477,7 +478,7 @@ format_next_process(caddr_t handle, char *(*get_userid
|
||||
p_wait = pp->p_wmesg;
|
||||
else {
|
||||
snprintf(waddr, sizeof(waddr), "%llx",
|
||||
@ -120,7 +128,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
p_wait = waddr;
|
||||
}
|
||||
} else
|
||||
@@ -541,13 +541,13 @@ compare_cpu(const void *v1, const void *v2)
|
||||
@@ -541,13 +542,13 @@ compare_cpu(const void *v1, const void *v2)
|
||||
{
|
||||
struct proc **pp1 = (struct proc **) v1;
|
||||
struct proc **pp2 = (struct proc **) v2;
|
||||
@ -137,7 +145,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
|
||||
ORDERKEY_PCTCPU
|
||||
ORDERKEY_CPUTIME
|
||||
@@ -565,13 +565,13 @@ compare_size(const void *v1, const void *v2)
|
||||
@@ -565,13 +566,13 @@ compare_size(const void *v1, const void *v2)
|
||||
{
|
||||
struct proc **pp1 = (struct proc **) v1;
|
||||
struct proc **pp2 = (struct proc **) v2;
|
||||
@ -154,7 +162,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
|
||||
ORDERKEY_MEM
|
||||
ORDERKEY_RSSIZE
|
||||
@@ -589,13 +589,13 @@ compare_res(const void *v1, const void *v2)
|
||||
@@ -589,13 +590,13 @@ compare_res(const void *v1, const void *v2)
|
||||
{
|
||||
struct proc **pp1 = (struct proc **) v1;
|
||||
struct proc **pp2 = (struct proc **) v2;
|
||||
@ -171,7 +179,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
|
||||
ORDERKEY_RSSIZE
|
||||
ORDERKEY_MEM
|
||||
@@ -613,13 +613,13 @@ compare_time(const void *v1, const void *v2)
|
||||
@@ -613,13 +614,13 @@ compare_time(const void *v1, const void *v2)
|
||||
{
|
||||
struct proc **pp1 = (struct proc **) v1;
|
||||
struct proc **pp2 = (struct proc **) v2;
|
||||
@ -188,7 +196,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
|
||||
ORDERKEY_CPUTIME
|
||||
ORDERKEY_PCTCPU
|
||||
@@ -637,13 +637,13 @@ compare_prio(const void *v1, const void *v2)
|
||||
@@ -637,13 +638,13 @@ compare_prio(const void *v1, const void *v2)
|
||||
{
|
||||
struct proc **pp1 = (struct proc **) v1;
|
||||
struct proc **pp2 = (struct proc **) v2;
|
||||
@ -205,7 +213,7 @@ $OpenBSD: patch-machine_m_openbsd_c,v 1.2 2012/07/10 12:08:29 sthen Exp $
|
||||
|
||||
ORDERKEY_PRIO
|
||||
ORDERKEY_PCTCPU
|
||||
@@ -667,7 +667,7 @@ compare_prio(const void *v1, const void *v2)
|
||||
@@ -667,7 +668,7 @@ compare_prio(const void *v1, const void *v2)
|
||||
uid_t
|
||||
proc_owner(pid_t pid)
|
||||
{
|
||||
|
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-sysdeps_openbsd_glibtop_machine_h,v 1.1 2012/12/18 21:38:12 sthen Exp $
|
||||
--- sysdeps/openbsd/glibtop_machine.h.orig Fri Dec 7 06:32:40 2012
|
||||
+++ sysdeps/openbsd/glibtop_machine.h Fri Dec 7 06:32:49 2012
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <time.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/proc.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <fcntl.h>
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-agent_mibgroup_host_data_access_swrun_kinfo_c,v 1.7 2012/10/18 14:01:45 sthen Exp $
|
||||
--- agent/mibgroup/host/data_access/swrun_kinfo.c.orig Wed Aug 29 22:10:31 2012
|
||||
+++ agent/mibgroup/host/data_access/swrun_kinfo.c Wed Aug 29 23:04:40 2012
|
||||
$OpenBSD: patch-agent_mibgroup_host_data_access_swrun_kinfo_c,v 1.8 2012/12/18 21:38:12 sthen Exp $
|
||||
--- agent/mibgroup/host/data_access/swrun_kinfo.c.orig Tue Oct 9 16:28:58 2012
|
||||
+++ agent/mibgroup/host/data_access/swrun_kinfo.c Thu Dec 6 15:32:14 2012
|
||||
@@ -3,7 +3,7 @@
|
||||
* hrSWRunTable data access:
|
||||
* kvm_getprocs() interface - FreeBSD, NetBSD, OpenBSD
|
||||
@ -10,7 +10,17 @@ $OpenBSD: patch-agent_mibgroup_host_data_access_swrun_kinfo_c,v 1.7 2012/10/18 1
|
||||
*/
|
||||
#include <net-snmp/net-snmp-config.h>
|
||||
|
||||
@@ -59,11 +59,15 @@ extern kvm_t *kd;
|
||||
@@ -29,6 +29,9 @@
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
+#ifdef HAVE_SYS_PROC_H
|
||||
+#include <sys/proc.h>
|
||||
+#endif
|
||||
#ifdef HAVE_SYS_SYSCTL_H
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
@@ -59,11 +62,15 @@ extern kvm_t *kd;
|
||||
#define SWRUN_K_FLAG ki_flag
|
||||
#define SWRUN_K_CLASS ki_pri.pri_class
|
||||
|
||||
@ -27,7 +37,7 @@ $OpenBSD: patch-agent_mibgroup_host_data_access_swrun_kinfo_c,v 1.7 2012/10/18 1
|
||||
#define SWRUN_K_STAT p_stat
|
||||
#define SWRUN_K_PID p_pid
|
||||
#define SWRUN_K_COMM p_comm
|
||||
@@ -157,7 +161,9 @@ netsnmp_arch_swrun_container_load( netsnmp_container *
|
||||
@@ -157,7 +164,9 @@ netsnmp_arch_swrun_container_load( netsnmp_container *
|
||||
DEBUGMSGTL(("swrun:load:arch"," Can't query kvm info\n"));
|
||||
return 1; /* No handle for retrieving process table */
|
||||
}
|
||||
@ -38,7 +48,7 @@ $OpenBSD: patch-agent_mibgroup_host_data_access_swrun_kinfo_c,v 1.7 2012/10/18 1
|
||||
proc_table = kvm_getproc2(kd, KERN_PROC_ALL, 0, sizeof(struct kinfo_proc2), &nprocs );
|
||||
#elif defined(KERN_PROC_PROC)
|
||||
proc_table = kvm_getprocs(kd, KERN_PROC_PROC, 0, &nprocs );
|
||||
@@ -288,7 +294,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *
|
||||
@@ -288,7 +297,7 @@ netsnmp_arch_swrun_container_load( netsnmp_container *
|
||||
entry->hrSWRunPerfCPU += (proc_table[i].ki_rusage_ch.ru_utime.tv_sec*1000000 + proc_table[i].ki_rusage_ch.ru_utime.tv_usec) / 10000;
|
||||
entry->hrSWRunPerfCPU += (proc_table[i].ki_rusage_ch.ru_stime.tv_sec*1000000 + proc_table[i].ki_rusage_ch.ru_stime.tv_usec) / 10000;
|
||||
entry->hrSWRunPerfMem = proc_table[i].ki_rssize * (getpagesize()/1024); /* in kB */
|
||||
|
@ -1,16 +1,17 @@
|
||||
$OpenBSD: patch-src_util_c,v 1.10 2012/09/27 05:53:43 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_util_c,v 1.11 2012/12/18 21:38:12 sthen Exp $
|
||||
|
||||
We don't use /proc on OpenBSD.
|
||||
|
||||
--- src/util.c.orig Mon Sep 10 20:15:59 2012
|
||||
+++ src/util.c Thu Sep 27 07:47:35 2012
|
||||
@@ -32,11 +32,19 @@
|
||||
--- src/util.c.orig Mon Sep 10 12:15:59 2012
|
||||
+++ src/util.c Fri Dec 7 06:15:20 2012
|
||||
@@ -32,11 +32,20 @@
|
||||
|
||||
#include <polkit/polkit.h>
|
||||
|
||||
+#ifdef __OpenBSD__
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/proc.h>
|
||||
+#include <sys/sysctl.h>
|
||||
+#include <kvm.h>
|
||||
+#endif
|
||||
@ -24,7 +25,7 @@ We don't use /proc on OpenBSD.
|
||||
gchar *ret = NULL;
|
||||
gchar *filename;
|
||||
gchar *contents;
|
||||
@@ -70,7 +78,31 @@ get_cmdline_of_pid (GPid pid)
|
||||
@@ -70,7 +79,31 @@ get_cmdline_of_pid (GPid pid)
|
||||
out:
|
||||
g_free (filename);
|
||||
g_free (contents);
|
||||
@ -56,7 +57,7 @@ We don't use /proc on OpenBSD.
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -204,12 +236,14 @@ get_caller_loginuid (GDBusMethodInvocation *context, g
|
||||
@@ -204,12 +237,14 @@ get_caller_loginuid (GDBusMethodInvocation *context, g
|
||||
static void
|
||||
setup_loginuid (gpointer data)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-src_openbsd_c,v 1.14 2012/04/13 21:21:10 pascal Exp $
|
||||
$OpenBSD: patch-src_openbsd_c,v 1.15 2012/12/18 21:38:12 sthen Exp $
|
||||
|
||||
declarations in common.h got changed, but upstream forgot to do the
|
||||
corresponding changes into openbsd.c
|
||||
@ -7,9 +7,17 @@ Adapt to new OpenBSD kinfo_proc API.
|
||||
|
||||
Protect kvm_getprocs and global vars with mutexes.
|
||||
|
||||
--- src/openbsd.c.orig Tue Oct 5 23:29:36 2010
|
||||
+++ src/openbsd.c Wed Apr 11 17:39:26 2012
|
||||
@@ -53,6 +53,7 @@
|
||||
--- src/openbsd.c.orig Tue Oct 5 15:29:36 2010
|
||||
+++ src/openbsd.c Fri Dec 7 06:11:21 2012
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/proc.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
@@ -53,6 +54,7 @@
|
||||
#include <ifaddrs.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
@ -17,7 +25,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
#include <machine/apmvar.h>
|
||||
|
||||
#include <net80211/ieee80211.h>
|
||||
@@ -81,6 +82,8 @@ size_t len = 0;
|
||||
@@ -81,6 +83,8 @@ size_t len = 0;
|
||||
int init_kvm = 0;
|
||||
int init_sensors = 0;
|
||||
|
||||
@ -26,7 +34,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
static int kvm_init()
|
||||
{
|
||||
if (init_kvm) {
|
||||
@@ -140,7 +143,7 @@ int check_mount(char *s)
|
||||
@@ -140,7 +144,7 @@ int check_mount(char *s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -35,7 +43,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
{
|
||||
int mib[2] = { CTL_KERN, KERN_BOOTTIME };
|
||||
struct timeval boottime;
|
||||
@@ -155,9 +158,10 @@ void update_uptime()
|
||||
@@ -155,9 +159,10 @@ void update_uptime()
|
||||
NORM_ERR("Could not get uptime");
|
||||
info.uptime = 0;
|
||||
}
|
||||
@ -47,7 +55,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
{
|
||||
static int mib[2] = { CTL_VM, VM_METER };
|
||||
struct vmtotal vmtotal;
|
||||
@@ -194,9 +198,10 @@ void update_meminfo()
|
||||
@@ -194,9 +199,10 @@ void update_meminfo()
|
||||
info.swap = 0;
|
||||
info.swapfree = 0;
|
||||
}
|
||||
@ -59,7 +67,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
{
|
||||
struct net_stat *ns;
|
||||
double delta;
|
||||
@@ -207,11 +212,11 @@ void update_net_stats()
|
||||
@@ -207,11 +213,11 @@ void update_net_stats()
|
||||
/* get delta */
|
||||
delta = current_update_time - last_update_time;
|
||||
if (delta <= 0.0001) {
|
||||
@ -73,7 +81,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
}
|
||||
|
||||
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
|
||||
@@ -266,28 +271,36 @@ void update_net_stats()
|
||||
@@ -266,28 +272,36 @@ void update_net_stats()
|
||||
}
|
||||
|
||||
freeifaddrs(ifap);
|
||||
@ -118,7 +126,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
for (i = 0; i < n_processes; i++) {
|
||||
if (p[i].p_stat == SRUN) {
|
||||
cnt++;
|
||||
@@ -295,96 +308,64 @@ void update_running_processes()
|
||||
@@ -295,96 +309,64 @@ void update_running_processes()
|
||||
}
|
||||
|
||||
info.run_procs = cnt;
|
||||
@ -233,7 +241,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
if (info.cpu_count > 1) {
|
||||
size = CPUSTATES * sizeof(int64_t);
|
||||
for (i = 0; i < info.cpu_count; i++) {
|
||||
@@ -426,10 +407,11 @@ void update_cpu_usage()
|
||||
@@ -426,10 +408,11 @@ void update_cpu_usage()
|
||||
oldused[i] = used;
|
||||
oldtotal[i] = total;
|
||||
}
|
||||
@ -247,7 +255,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
{
|
||||
double v[3];
|
||||
|
||||
@@ -438,6 +420,7 @@ void update_load_average()
|
||||
@@ -438,6 +421,7 @@ void update_load_average()
|
||||
info.loadavg[0] = (float) v[0];
|
||||
info.loadavg[1] = (float) v[1];
|
||||
info.loadavg[2] = (float) v[2];
|
||||
@ -255,7 +263,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
}
|
||||
|
||||
#define OBSD_MAX_SENSORS 256
|
||||
@@ -606,10 +589,11 @@ char get_freq(char *p_client_buffer, size_t client_buf
|
||||
@@ -606,10 +590,11 @@ char get_freq(char *p_client_buffer, size_t client_buf
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -268,7 +276,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -665,19 +649,11 @@ cleanup:
|
||||
@@ -665,19 +650,11 @@ cleanup:
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -290,7 +298,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
/* While topless is obviously better, top is also not bad. */
|
||||
|
||||
int comparecpu(const void *a, const void *b)
|
||||
@@ -708,8 +684,8 @@ int comparemem(const void *a, const void *b)
|
||||
@@ -708,8 +685,8 @@ int comparemem(const void *a, const void *b)
|
||||
|
||||
inline void proc_find_top(struct process **cpu, struct process **mem)
|
||||
{
|
||||
@ -301,7 +309,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
int i, j = 0;
|
||||
struct process *processes;
|
||||
int mib[2];
|
||||
@@ -730,9 +706,11 @@ inline void proc_find_top(struct process **cpu, struct
|
||||
@@ -730,9 +707,11 @@ inline void proc_find_top(struct process **cpu, struct
|
||||
/* translate bytes into page count */
|
||||
total_pages = usermem / pagesize;
|
||||
|
||||
@ -315,7 +323,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
processes = malloc(n_processes * sizeof(struct process));
|
||||
|
||||
for (i = 0; i < n_processes; i++) {
|
||||
@@ -740,9 +718,12 @@ inline void proc_find_top(struct process **cpu, struct
|
||||
@@ -740,9 +719,12 @@ inline void proc_find_top(struct process **cpu, struct
|
||||
processes[j].pid = p[i].p_pid;
|
||||
processes[j].name = strndup(p[i].p_comm, text_buffer_size);
|
||||
processes[j].amount = 100.0 * p[i].p_pctcpu / FSCALE;
|
||||
@ -328,7 +336,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
|
||||
qsort(processes, j - 1, sizeof(struct process), comparemem);
|
||||
for (i = 0; i < 10; i++) {
|
||||
@@ -752,6 +733,8 @@ inline void proc_find_top(struct process **cpu, struct
|
||||
@@ -752,6 +734,8 @@ inline void proc_find_top(struct process **cpu, struct
|
||||
tmp->pid = processes[i].pid;
|
||||
tmp->amount = processes[i].amount;
|
||||
tmp->name = strndup(processes[i].name, text_buffer_size);
|
||||
@ -337,7 +345,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
|
||||
ttmp = mem[i];
|
||||
mem[i] = tmp;
|
||||
@@ -769,6 +752,8 @@ inline void proc_find_top(struct process **cpu, struct
|
||||
@@ -769,6 +753,8 @@ inline void proc_find_top(struct process **cpu, struct
|
||||
tmp->pid = processes[i].pid;
|
||||
tmp->amount = processes[i].amount;
|
||||
tmp->name = strndup(processes[i].name, text_buffer_size);
|
||||
@ -346,7 +354,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
|
||||
ttmp = cpu[i];
|
||||
cpu[i] = tmp;
|
||||
@@ -784,7 +769,6 @@ inline void proc_find_top(struct process **cpu, struct
|
||||
@@ -784,7 +770,6 @@ inline void proc_find_top(struct process **cpu, struct
|
||||
free(processes);
|
||||
}
|
||||
|
||||
@ -354,7 +362,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
#define APMDEV "/dev/apm"
|
||||
#define APM_UNKNOWN 255
|
||||
|
||||
@@ -908,7 +892,6 @@ char *get_apm_battery_time()
|
||||
@@ -908,7 +893,6 @@ char *get_apm_battery_time()
|
||||
return out;
|
||||
}
|
||||
|
||||
@ -362,7 +370,7 @@ Protect kvm_getprocs and global vars with mutexes.
|
||||
|
||||
/* empty stubs so conky links */
|
||||
void prepare_update()
|
||||
@@ -923,8 +906,4 @@ int get_entropy_avail(unsigned int *val)
|
||||
@@ -923,8 +907,4 @@ int get_entropy_avail(unsigned int *val)
|
||||
int get_entropy_poolsize(unsigned int *val)
|
||||
{
|
||||
return 1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-server_gam_kqueue_c,v 1.7 2011/09/06 11:48:04 ajacoutot Exp $
|
||||
$OpenBSD: patch-server_gam_kqueue_c,v 1.8 2012/12/18 21:38:12 sthen Exp $
|
||||
|
||||
From FreeBSD:
|
||||
Make sure that excluded paths do not get opened (but rather they will be
|
||||
@ -14,8 +14,8 @@ OpenBSD does not have maxfilesperproc, which means max_open_files will
|
||||
default to "0" and kqueue will never be used. Instead, use get+setrlimit
|
||||
to get a correct value.
|
||||
|
||||
--- server/gam_kqueue.c.orig Wed Jul 4 15:50:41 2007
|
||||
+++ server/gam_kqueue.c Fri Sep 2 14:45:19 2011
|
||||
--- server/gam_kqueue.c.orig Wed Jul 4 07:50:41 2007
|
||||
+++ server/gam_kqueue.c Thu Dec 6 16:04:59 2012
|
||||
@@ -31,7 +31,8 @@
|
||||
* - kqueue needs to be moved out the UFS code.
|
||||
*
|
||||
@ -26,7 +26,13 @@ to get a correct value.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -58,10 +59,13 @@
|
||||
@@ -53,15 +54,19 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
+#include <sys/proc.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/event.h>
|
||||
#include <sys/time.h>
|
||||
@ -40,7 +46,7 @@ to get a correct value.
|
||||
#include "gam_server.h"
|
||||
#include "gam_poll_basic.h"
|
||||
|
||||
@@ -323,20 +327,6 @@ gam_kqueue_isdir (const char *pathname, MonitorFlags f
|
||||
@@ -323,20 +328,6 @@ gam_kqueue_isdir (const char *pathname, MonitorFlags f
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +67,7 @@ to get a correct value.
|
||||
/*** HashTable ***************************************************************/
|
||||
|
||||
static HashTable *
|
||||
@@ -509,33 +499,49 @@ static gboolean
|
||||
@@ -509,33 +500,49 @@ static gboolean
|
||||
gam_kqueue_monitor_enable_kqueue (Monitor *mon)
|
||||
{
|
||||
struct kevent ev[1];
|
||||
@ -117,7 +123,7 @@ to get a correct value.
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -840,6 +846,9 @@ gam_kqueue_sub_monitor_emit_event (SubMonitor *smon,
|
||||
@@ -840,6 +847,9 @@ gam_kqueue_sub_monitor_emit_event (SubMonitor *smon,
|
||||
case GAMIN_EVENT_MOVED:
|
||||
gam_kqueue_sub_monitor_set_missing(smon);
|
||||
break;
|
||||
@ -127,7 +133,7 @@ to get a correct value.
|
||||
}
|
||||
|
||||
gam_server_emit_event(mon->pathname, isdir, event, smon->subs, 1);
|
||||
@@ -981,6 +990,9 @@ gam_kqueue_file_monitor_emit_event (FileMonitor *fmon,
|
||||
@@ -981,6 +991,9 @@ gam_kqueue_file_monitor_emit_event (FileMonitor *fmon,
|
||||
|
||||
gam_kqueue_hash_table_remove(fmon->smon->fmons, fmon);
|
||||
break;
|
||||
@ -137,7 +143,7 @@ to get a correct value.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1125,7 +1137,12 @@ gam_kqueue_init (void)
|
||||
@@ -1125,7 +1138,12 @@ gam_kqueue_init (void)
|
||||
GIOChannel *channel;
|
||||
unsigned int maxfiles;
|
||||
unsigned int maxfilesperproc;
|
||||
@ -150,7 +156,7 @@ to get a correct value.
|
||||
kq = kqueue();
|
||||
if (kq < 0)
|
||||
{
|
||||
@@ -1133,11 +1150,16 @@ gam_kqueue_init (void)
|
||||
@@ -1133,11 +1151,16 @@ gam_kqueue_init (void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -170,7 +176,7 @@ to get a correct value.
|
||||
/*
|
||||
* We make sure to:
|
||||
* - never paralyze the system (CFG_GLOBAL_FILE_RESERVE_RATIO)
|
||||
@@ -1145,6 +1167,22 @@ gam_kqueue_init (void)
|
||||
@@ -1145,6 +1168,22 @@ gam_kqueue_init (void)
|
||||
*/
|
||||
|
||||
maxfiles *= CFG_GLOBAL_FILE_RESERVE_RATIO;
|
||||
|
@ -1,10 +1,19 @@
|
||||
$OpenBSD: patch-machdep_nbsd-44_c,v 1.2 2011/07/06 13:41:29 jasper Exp $
|
||||
--- machdep/nbsd-44.c.orig Mon Apr 8 04:35:21 2002
|
||||
+++ machdep/nbsd-44.c Wed Jul 6 15:40:43 2011
|
||||
@@ -211,6 +211,28 @@ static int pidmapsiz = sizeof(pidmap) / sizeof(pidmap[
|
||||
$OpenBSD: patch-machdep_nbsd-44_c,v 1.3 2012/12/18 21:38:12 sthen Exp $
|
||||
--- machdep/nbsd-44.c.orig Sun Apr 7 20:35:21 2002
|
||||
+++ machdep/nbsd-44.c Thu Dec 6 15:28:10 2012
|
||||
@@ -172,6 +172,7 @@ REAL_REGEX_FUNCS
|
||||
* Now, set up everything we need to write a GetProc() routine.
|
||||
*/
|
||||
|
||||
+#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
@@ -210,6 +211,28 @@ static int pidmapsiz = sizeof(pidmap) / sizeof(pidmap[
|
||||
#define _PROC_UID(p) (p)->ki_uid
|
||||
#endif
|
||||
#endif /* __FreeBSD__ */
|
||||
|
||||
+
|
||||
+#if defined(__OpenBSD__)
|
||||
+#define _SYSCTL_ARG KERN_PROC
|
||||
+#define _SYSCTL_NMIB 6
|
||||
@ -26,7 +35,6 @@ $OpenBSD: patch-machdep_nbsd-44_c,v 1.2 2011/07/06 13:41:29 jasper Exp $
|
||||
+#define _PROC_TDEV(p) (p)->p_tdev
|
||||
+#define _PROC_UID(p) (p)->p_uid
|
||||
+#endif
|
||||
+
|
||||
|
||||
#if defined(__NetBSD_Version__) && defined(KERN_PROC2)
|
||||
#define _SYSCTL_ARG KERN_PROC2
|
||||
#define _SYSCTL_NMIB 6
|
||||
|
@ -1,7 +1,28 @@
|
||||
$OpenBSD: patch-machine_c,v 1.1 2012/07/10 07:53:21 sthen Exp $
|
||||
--- machine.c.orig Tue Jul 10 08:21:51 2012
|
||||
+++ machine.c Tue Jul 10 08:22:32 2012
|
||||
@@ -511,7 +511,7 @@ format_next_process(caddr_t handle, char *(*get_userid
|
||||
$OpenBSD: patch-machine_c,v 1.2 2012/12/18 21:38:12 sthen Exp $
|
||||
--- machine.c.orig Fri May 4 07:24:08 2012
|
||||
+++ machine.c Thu Dec 6 15:26:14 2012
|
||||
@@ -35,14 +35,16 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
+#include <sys/dkstat.h>
|
||||
+#include <sys/mount.h>
|
||||
+#include <sys/proc.h>
|
||||
+#include <sys/swap.h>
|
||||
+#include <sys/sysctl.h>
|
||||
+
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
-#include <sys/sysctl.h>
|
||||
-#include <sys/dkstat.h>
|
||||
-#include <sys/mount.h>
|
||||
-#include <sys/swap.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -511,7 +513,7 @@ format_next_process(caddr_t handle, char *(*get_userid
|
||||
p_wait = pp->p_wmesg;
|
||||
else {
|
||||
snprintf(waddr, sizeof(waddr), "%llx",
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
--- wmmon/wmmon.c.orig Tue May 19 22:13:16 1998
|
||||
+++ wmmon/wmmon.c Thu Dec 6 22:30:02 2012
|
||||
$OpenBSD: patch-wmmon_wmmon_c,v 1.7 2012/12/18 21:38:12 sthen Exp $
|
||||
--- wmmon/wmmon.c.orig Tue May 19 15:13:16 1998
|
||||
+++ wmmon/wmmon.c Thu Dec 6 15:29:36 2012
|
||||
@@ -28,6 +28,10 @@
|
||||
Changes:
|
||||
----
|
||||
@ -12,7 +12,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
18/05/1998 (Antoine Nulle, warp@xs4all.nl)
|
||||
* MEM/SWAP/UPTIME only updated when visible
|
||||
* Using global file descriptors to reduce file
|
||||
@@ -72,10 +76,20 @@
|
||||
@@ -72,10 +76,21 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@ -22,18 +22,19 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
#include <sys/wait.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
+#include <limits.h>
|
||||
+#include <sys/proc.h>
|
||||
+#include <sys/disk.h>
|
||||
+#include <sys/dkstat.h>
|
||||
+#include <sys/malloc.h>
|
||||
+#include <sys/swap.h>
|
||||
+#include <sys/sysctl.h>
|
||||
|
||||
+#include <limits.h>
|
||||
+
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/xpm.h>
|
||||
#include <X11/extensions/shape.h>
|
||||
@@ -100,11 +114,11 @@
|
||||
@@ -100,11 +115,11 @@
|
||||
/* Global Variables */
|
||||
/********************/
|
||||
|
||||
@ -49,7 +50,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
|
||||
/* functions */
|
||||
void usage(void);
|
||||
@@ -114,17 +128,15 @@ void DrawStats_io(int *, int, int, int, int);
|
||||
@@ -114,17 +129,15 @@ void DrawStats_io(int *, int, int, int, int);
|
||||
|
||||
void wmmon_routine(int, char **);
|
||||
|
||||
@ -72,7 +73,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
for (i=1; i<argc; i++) {
|
||||
char *arg = argv[i];
|
||||
|
||||
@@ -155,22 +167,22 @@ void main(int argc, char *argv[]) {
|
||||
@@ -155,22 +168,22 @@ void main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
wmmon_routine(argc, argv);
|
||||
@ -103,7 +104,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
} stat_dev;
|
||||
|
||||
#define MAX_STAT_DEVICES (4)
|
||||
@@ -182,7 +194,6 @@ char *middle_action;
|
||||
@@ -182,7 +195,6 @@ char *middle_action;
|
||||
|
||||
|
||||
int checksysdevs(void);
|
||||
@ -111,7 +112,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
void DrawActive(char *);
|
||||
|
||||
void update_stat_cpu(stat_dev *);
|
||||
@@ -213,8 +224,9 @@ void wmmon_routine(int argc, char **argv) {
|
||||
@@ -213,8 +225,9 @@ void wmmon_routine(int argc, char **argv) {
|
||||
long istat;
|
||||
long idle;
|
||||
|
||||
@ -123,7 +124,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
char *p;
|
||||
|
||||
int xpm_X = 0, xpm_Y = 0;
|
||||
@@ -223,22 +235,36 @@ void wmmon_routine(int argc, char **argv) {
|
||||
@@ -223,22 +236,36 @@ void wmmon_routine(int argc, char **argv) {
|
||||
long ref_time = 0;
|
||||
long cnt_time;
|
||||
|
||||
@ -170,7 +171,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
stat_device[i].hisaddcnt = 0;
|
||||
}
|
||||
|
||||
@@ -246,38 +272,40 @@ void wmmon_routine(int argc, char **argv) {
|
||||
@@ -246,38 +273,40 @@ void wmmon_routine(int argc, char **argv) {
|
||||
if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION);
|
||||
if (MIDDLE_ACTION) middle_action = strdup(MIDDLE_ACTION);
|
||||
|
||||
@ -228,7 +229,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
if (stat_current == 2) {
|
||||
xpm_X = 64;
|
||||
setMaskXY(-64, 0);
|
||||
@@ -288,7 +316,7 @@ void wmmon_routine(int argc, char **argv) {
|
||||
@@ -288,7 +317,7 @@ void wmmon_routine(int argc, char **argv) {
|
||||
DrawActive(stat_device[stat_current].name);
|
||||
|
||||
while (1) {
|
||||
@ -237,7 +238,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
|
||||
waitpid(0, NULL, WNOHANG);
|
||||
|
||||
@@ -338,7 +366,7 @@ void wmmon_routine(int argc, char **argv) {
|
||||
@@ -338,7 +367,7 @@ void wmmon_routine(int argc, char **argv) {
|
||||
|
||||
/*----------- online tijd neerzetten! ----------*/
|
||||
|
||||
@ -246,7 +247,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
|
||||
/* cnt_time = uptime in seconden */
|
||||
/*
|
||||
@@ -405,7 +433,6 @@ void wmmon_routine(int argc, char **argv) {
|
||||
@@ -405,7 +434,6 @@ void wmmon_routine(int argc, char **argv) {
|
||||
case DestroyNotify:
|
||||
XCloseDisplay(display);
|
||||
exit(0);
|
||||
@ -254,7 +255,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
case ButtonPress:
|
||||
but_stat = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y);
|
||||
break;
|
||||
@@ -430,7 +457,6 @@ void wmmon_routine(int argc, char **argv) {
|
||||
@@ -430,7 +458,6 @@ void wmmon_routine(int argc, char **argv) {
|
||||
}
|
||||
case 1:
|
||||
stat_current++;
|
||||
@ -262,7 +263,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
if (stat_current == stat_online)
|
||||
stat_current = 0;
|
||||
|
||||
@@ -460,146 +486,116 @@ void wmmon_routine(int argc, char **argv) {
|
||||
@@ -460,146 +487,116 @@ void wmmon_routine(int argc, char **argv) {
|
||||
|
||||
void update_stat_cpu(stat_dev *st) {
|
||||
|
||||
@ -486,7 +487,7 @@ $OpenBSD: patch-wmmon_wmmon_c,v 1.6 2012/12/06 22:30:22 sthen Exp $
|
||||
|
||||
return 3;
|
||||
}
|
||||
@@ -733,7 +729,35 @@ void usage(void) {
|
||||
@@ -733,7 +730,35 @@ void usage(void) {
|
||||
|
||||
void printversion(void) {
|
||||
|
||||
|
@ -1,19 +1,21 @@
|
||||
$OpenBSD: patch-src_NetBSD_os_c,v 1.2 2011/07/06 13:02:01 jasper Exp $
|
||||
$OpenBSD: patch-src_NetBSD_os_c,v 1.3 2012/12/18 21:38:12 sthen Exp $
|
||||
|
||||
yes, I know there's a src/OpenBSD in there too.
|
||||
it's not used somehow...
|
||||
|
||||
--- src/NetBSD/os.c.orig Thu Apr 24 02:21:29 2003
|
||||
+++ src/NetBSD/os.c Wed Jul 6 15:01:20 2011
|
||||
@@ -27,6 +27,7 @@
|
||||
--- src/NetBSD/os.c.orig Wed Apr 23 18:21:29 2003
|
||||
+++ src/NetBSD/os.c Thu Dec 6 15:22:20 2012
|
||||
@@ -26,7 +26,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <sys/param.h>
|
||||
+#include <sys/proc.h>
|
||||
#include <sys/sysctl.h>
|
||||
+#include <stdlib.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include <Xm/Xm.h>
|
||||
@@ -82,11 +83,7 @@ GetProcInfo(void)
|
||||
@@ -82,11 +84,7 @@ GetProcInfo(void)
|
||||
exit(5);
|
||||
}
|
||||
|
||||
@ -26,7 +28,7 @@ it's not used somehow...
|
||||
if (kp == NULL) {
|
||||
char msg[_POSIX2_LINE_MAX * 2];
|
||||
|
||||
@@ -126,7 +123,7 @@ GetStatus(ProcInfo *p)
|
||||
@@ -126,7 +124,7 @@ GetStatus(ProcInfo *p)
|
||||
#ifdef HAVE_REGEX
|
||||
if (active.match_regexp) {
|
||||
int regmatch = regexec(&active.re_pat,
|
||||
@ -35,7 +37,7 @@ it's not used somehow...
|
||||
(size_t) NULL, (regmatch_t *) NULL,
|
||||
REG_NOTBOL|REG_NOTEOL);
|
||||
if (regmatch == REG_NOMATCH) {
|
||||
@@ -134,7 +131,7 @@ GetStatus(ProcInfo *p)
|
||||
@@ -134,7 +132,7 @@ GetStatus(ProcInfo *p)
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
@ -44,7 +46,7 @@ it's not used somehow...
|
||||
return False;
|
||||
#ifdef HAVE_REGEX
|
||||
}
|
||||
@@ -142,7 +139,7 @@ GetStatus(ProcInfo *p)
|
||||
@@ -142,7 +140,7 @@ GetStatus(ProcInfo *p)
|
||||
}
|
||||
|
||||
/* root process */
|
||||
@ -53,7 +55,7 @@ it's not used somehow...
|
||||
return False;
|
||||
|
||||
/*
|
||||
@@ -157,19 +154,19 @@ GetStatus(ProcInfo *p)
|
||||
@@ -157,19 +155,19 @@ GetStatus(ProcInfo *p)
|
||||
|
||||
See also the comments in BSDI/xps.c. */
|
||||
|
||||
@ -79,7 +81,7 @@ it's not used somehow...
|
||||
|
||||
EndNode->color = base.nodeColor[pstat];
|
||||
return True;
|
||||
@@ -179,26 +176,26 @@ void
|
||||
@@ -179,26 +177,26 @@ void
|
||||
GetProcName(ProcInfo *p, TREENODE *node)
|
||||
{
|
||||
ProcInfo proc = *p;
|
||||
@ -114,7 +116,7 @@ it's not used somehow...
|
||||
strcpy(node->label1, username);
|
||||
} else {
|
||||
strcpy(node->label1, UNKNOWN_USER);
|
||||
@@ -209,7 +206,7 @@ GetProcName(ProcInfo *p, TREENODE *node)
|
||||
@@ -209,7 +207,7 @@ GetProcName(ProcInfo *p, TREENODE *node)
|
||||
#ifdef XPS_RECOLOR_LOGIN_PROCESSES
|
||||
for (i=0;i<NUMLABS ;i++ ) {
|
||||
if (strcmp(node->label, label_array[i]) == 0) {
|
||||
@ -123,7 +125,7 @@ it's not used somehow...
|
||||
strcpy(node->label1, label_array[i]);
|
||||
node->color = base.xterm;
|
||||
node->show_username = 1;
|
||||
@@ -218,7 +215,7 @@ GetProcName(ProcInfo *p, TREENODE *node)
|
||||
@@ -218,7 +216,7 @@ GetProcName(ProcInfo *p, TREENODE *node)
|
||||
} /* endfor */
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,18 @@
|
||||
$OpenBSD: patch-base_debug_debugger_posix_cc,v 1.9 2012/08/26 18:47:01 robert Exp $
|
||||
--- base/debug/debugger_posix.cc.orig Tue Aug 14 09:01:47 2012
|
||||
+++ base/debug/debugger_posix.cc Wed Aug 15 23:14:34 2012
|
||||
@@ -103,33 +103,36 @@ bool BeingDebugged() {
|
||||
$OpenBSD: patch-base_debug_debugger_posix_cc,v 1.10 2012/12/18 21:38:12 sthen Exp $
|
||||
--- base/debug/debugger_posix.cc.orig Tue Nov 13 19:02:09 2012
|
||||
+++ base/debug/debugger_posix.cc Fri Dec 7 06:18:38 2012
|
||||
@@ -33,6 +33,10 @@
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
+#if defined(OS_OPENBSD)
|
||||
+#include <sys/proc.h>
|
||||
+#endif
|
||||
+
|
||||
#if defined(OS_FREEBSD)
|
||||
#include <sys/user.h>
|
||||
#endif
|
||||
@@ -103,33 +107,36 @@ bool BeingDebugged() {
|
||||
|
||||
// Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE. The source and
|
||||
// binary interfaces may change.
|
||||
|
@ -1,7 +1,15 @@
|
||||
$OpenBSD: patch-base_process_util_openbsd_cc,v 1.9 2012/04/15 10:40:44 robert Exp $
|
||||
--- base/process_util_openbsd.cc.orig Sat Apr 14 12:10:29 2012
|
||||
+++ base/process_util_openbsd.cc Sat Apr 14 16:55:59 2012
|
||||
@@ -30,39 +30,59 @@
|
||||
$OpenBSD: patch-base_process_util_openbsd_cc,v 1.10 2012/12/18 21:38:12 sthen Exp $
|
||||
--- base/process_util_openbsd.cc.orig Tue Nov 13 19:02:10 2012
|
||||
+++ base/process_util_openbsd.cc Fri Dec 7 06:24:10 2012
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/param.h>
|
||||
+#include <sys/proc.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/user.h>
|
||||
#include <time.h>
|
||||
@@ -30,39 +31,59 @@
|
||||
namespace base {
|
||||
|
||||
ProcessId GetParentProcessId(ProcessHandle process) {
|
||||
@ -76,7 +84,7 @@ $OpenBSD: patch-base_process_util_openbsd_cc,v 1.9 2012/04/15 10:40:44 robert Ex
|
||||
}
|
||||
|
||||
ProcessIterator::ProcessIterator(const ProcessFilter* filter)
|
||||
@@ -194,20 +214,28 @@ ProcessMetrics* ProcessMetrics::CreateProcessMetrics(P
|
||||
@@ -194,20 +215,28 @@ ProcessMetrics* ProcessMetrics::CreateProcessMetrics(P
|
||||
}
|
||||
|
||||
size_t ProcessMetrics::GetPagefileUsage() const {
|
||||
@ -110,7 +118,7 @@ $OpenBSD: patch-base_process_util_openbsd_cc,v 1.9 2012/04/15 10:40:44 robert Ex
|
||||
}
|
||||
|
||||
size_t ProcessMetrics::GetPeakPagefileUsage() const {
|
||||
@@ -216,20 +244,28 @@ size_t ProcessMetrics::GetPeakPagefileUsage() const {
|
||||
@@ -216,20 +245,28 @@ size_t ProcessMetrics::GetPeakPagefileUsage() const {
|
||||
}
|
||||
|
||||
size_t ProcessMetrics::GetWorkingSetSize() const {
|
||||
@ -144,7 +152,7 @@ $OpenBSD: patch-base_process_util_openbsd_cc,v 1.9 2012/04/15 10:40:44 robert Ex
|
||||
}
|
||||
|
||||
size_t ProcessMetrics::GetPeakWorkingSetSize() const {
|
||||
@@ -270,20 +306,27 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_coun
|
||||
@@ -270,20 +307,27 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_coun
|
||||
}
|
||||
|
||||
static int GetProcessCPU(pid_t pid) {
|
||||
|
@ -1,15 +1,16 @@
|
||||
$OpenBSD: patch-dbus_dbus-sysdeps-util-unix_c,v 1.5 2012/10/11 07:25:20 ajacoutot Exp $
|
||||
$OpenBSD: patch-dbus_dbus-sysdeps-util-unix_c,v 1.6 2012/12/18 21:38:12 sthen Exp $
|
||||
|
||||
XXX push upstream
|
||||
|
||||
--- dbus/dbus-sysdeps-util-unix.c.orig Fri Sep 28 21:17:25 2012
|
||||
+++ dbus/dbus-sysdeps-util-unix.c Thu Oct 11 09:19:52 2012
|
||||
@@ -55,6 +55,12 @@
|
||||
--- dbus/dbus-sysdeps-util-unix.c.orig Fri Sep 28 13:17:25 2012
|
||||
+++ dbus/dbus-sysdeps-util-unix.c Thu Dec 6 15:20:23 2012
|
||||
@@ -55,6 +55,13 @@
|
||||
#include <sys/syslimits.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __OpenBSD__
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/proc.h>
|
||||
+#include <sys/sysctl.h>
|
||||
+#include <kvm.h>
|
||||
+#endif
|
||||
@ -17,7 +18,7 @@ XXX push upstream
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
@@ -1107,7 +1113,14 @@ _dbus_command_for_pid (unsigned long pid,
|
||||
@@ -1107,7 +1114,14 @@ _dbus_command_for_pid (unsigned long pid,
|
||||
/* This is all Linux-specific for now */
|
||||
DBusString path;
|
||||
DBusString cmdline;
|
||||
@ -32,7 +33,7 @@ XXX push upstream
|
||||
|
||||
if (!_dbus_string_init (&path))
|
||||
{
|
||||
@@ -1121,7 +1134,8 @@ _dbus_command_for_pid (unsigned long pid,
|
||||
@@ -1121,7 +1135,8 @@ _dbus_command_for_pid (unsigned long pid,
|
||||
_dbus_string_free (&path);
|
||||
return FALSE;
|
||||
}
|
||||
@ -42,7 +43,7 @@ XXX push upstream
|
||||
if (!_dbus_string_append_printf (&path, "/proc/%ld/cmdline", pid))
|
||||
goto oom;
|
||||
|
||||
@@ -1148,6 +1162,24 @@ _dbus_command_for_pid (unsigned long pid,
|
||||
@@ -1148,6 +1163,24 @@ _dbus_command_for_pid (unsigned long pid,
|
||||
|
||||
if (!_dbus_close (fd, error))
|
||||
goto fail;
|
||||
@ -67,7 +68,7 @@ XXX push upstream
|
||||
|
||||
string_squash_nonprintable (&cmdline);
|
||||
|
||||
@@ -1162,5 +1194,8 @@ oom:
|
||||
@@ -1162,5 +1195,8 @@ oom:
|
||||
fail:
|
||||
_dbus_string_free (&cmdline);
|
||||
_dbus_string_free (&path);
|
||||
|
@ -1,13 +1,14 @@
|
||||
$OpenBSD: patch-src_libtracker-common_tracker-dbus_c,v 1.5 2011/10/16 08:54:53 ajacoutot Exp $
|
||||
--- src/libtracker-common/tracker-dbus.c.orig Sun Oct 16 09:32:47 2011
|
||||
+++ src/libtracker-common/tracker-dbus.c Sun Oct 16 09:36:54 2011
|
||||
@@ -23,6 +23,14 @@
|
||||
$OpenBSD: patch-src_libtracker-common_tracker-dbus_c,v 1.6 2012/12/18 21:38:12 sthen Exp $
|
||||
--- src/libtracker-common/tracker-dbus.c.orig Wed Aug 3 06:53:16 2011
|
||||
+++ src/libtracker-common/tracker-dbus.c Fri Dec 7 06:03:18 2012
|
||||
@@ -23,6 +23,15 @@
|
||||
#include <gio/gunixinputstream.h>
|
||||
#include <gio/gunixoutputstream.h>
|
||||
|
||||
+#ifdef __OpenBSD__
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/proc.h>
|
||||
+#include <sys/sysctl.h>
|
||||
+#include <stdio.h>
|
||||
+#include <kvm.h>
|
||||
@ -16,7 +17,7 @@ $OpenBSD: patch-src_libtracker-common_tracker-dbus_c,v 1.5 2011/10/16 08:54:53 a
|
||||
#include "tracker-dbus.h"
|
||||
#include "tracker-log.h"
|
||||
|
||||
@@ -139,6 +147,7 @@ client_data_new (gchar *sender)
|
||||
@@ -139,6 +148,7 @@ client_data_new (gchar *sender)
|
||||
}
|
||||
|
||||
if (get_binary) {
|
||||
@ -24,7 +25,7 @@ $OpenBSD: patch-src_libtracker-common_tracker-dbus_c,v 1.5 2011/10/16 08:54:53 a
|
||||
gchar *filename;
|
||||
gchar *pid_str;
|
||||
gchar *contents = NULL;
|
||||
@@ -171,6 +180,29 @@ client_data_new (gchar *sender)
|
||||
@@ -171,6 +181,29 @@ client_data_new (gchar *sender)
|
||||
|
||||
g_strfreev (strv);
|
||||
g_free (contents);
|
||||
|
@ -1,7 +1,15 @@
|
||||
$OpenBSD: patch-src_task-manager-bsd_c,v 1.1 2012/01/09 16:50:19 robert Exp $
|
||||
--- src/task-manager-bsd.c.orig Mon Jan 9 09:48:24 2012
|
||||
+++ src/task-manager-bsd.c Mon Jan 9 09:49:01 2012
|
||||
@@ -41,7 +41,7 @@ gboolean get_task_list (GArray *task_list)
|
||||
$OpenBSD: patch-src_task-manager-bsd_c,v 1.2 2012/12/18 21:38:12 sthen Exp $
|
||||
--- src/task-manager-bsd.c.orig Fri May 21 05:37:20 2010
|
||||
+++ src/task-manager-bsd.c Fri Dec 7 06:22:48 2012
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/sched.h>
|
||||
#include <sys/sysctl.h>
|
||||
+#include <sys/proc.h>
|
||||
/* for swapctl() */
|
||||
#include <sys/swap.h>
|
||||
/* for strlcpy() */
|
||||
@@ -41,7 +42,7 @@ gboolean get_task_list (GArray *task_list)
|
||||
{
|
||||
int mib[6];
|
||||
size_t size;
|
||||
@ -10,7 +18,7 @@ $OpenBSD: patch-src_task-manager-bsd_c,v 1.1 2012/01/09 16:50:19 robert Exp $
|
||||
Task t;
|
||||
struct passwd *passwdp;
|
||||
char **args, **ptr;
|
||||
@@ -49,23 +49,23 @@ gboolean get_task_list (GArray *task_list)
|
||||
@@ -49,23 +50,23 @@ gboolean get_task_list (GArray *task_list)
|
||||
int nproc, i;
|
||||
|
||||
mib[0] = CTL_KERN;
|
||||
@ -41,7 +49,7 @@ $OpenBSD: patch-src_task-manager-bsd_c,v 1.1 2012/01/09 16:50:19 robert Exp $
|
||||
t.pid = p.p_pid;
|
||||
t.ppid = p.p_ppid;
|
||||
t.uid = p.p_uid;
|
||||
@@ -117,17 +117,17 @@ gboolean
|
||||
@@ -117,17 +118,17 @@ gboolean
|
||||
pid_is_sleeping (guint pid)
|
||||
{
|
||||
int mib[6];
|
||||
|
Loading…
x
Reference in New Issue
Block a user