| 1 | diff -Naur ../proctools-0.4pre1/pfind/Makefile ./pfind/Makefile |
| 2 | --- pfind/Makefile 2003-12-06 10:18:37.000000000 +0100 |
| 3 | +++ pfind/Makefile 2008-06-01 10:27:02.000000000 +0200 |
| 4 | @@ -1,11 +1,6 @@ |
| 5 | PROG= pfind |
| 6 | DPADD+= ../proctools/libproctools.a |
| 7 | -LDADD= -L${MAKEOBJDIR} -lproctools -lkvm |
| 8 | +LDADD= -L${MAKEOBJDIR} -lproctools |
| 9 | CLEANFILES+= pfind.cat1 |
| 10 | |
| 11 | -.if defined(OLDKVM) |
| 12 | -BINGRP= kmem |
| 13 | -BINMODE= 2555 |
| 14 | -.endif |
| 15 | - |
| 16 | .include <bsd.prog.mk> |
| 17 | diff -Naur ../proctools-0.4pre1/pgrep/Makefile ./pgrep/Makefile |
| 18 | --- pgrep/Makefile 2003-12-06 10:18:38.000000000 +0100 |
| 19 | +++ pgrep/Makefile 2008-06-01 10:23:38.000000000 +0200 |
| 20 | @@ -1,11 +1,6 @@ |
| 21 | PROG= pgrep |
| 22 | DPADD+= ../proctools/libproctools.a |
| 23 | -LDADD= -L${MAKEOBJDIR} -lproctools -lkvm |
| 24 | +LDADD= -L${MAKEOBJDIR} -lproctools |
| 25 | CLEANFILES+= pgrep.cat1 |
| 26 | |
| 27 | -.if defined(OLDKVM) |
| 28 | -BINGRP= kmem |
| 29 | -BINMODE= 2555 |
| 30 | -.endif |
| 31 | - |
| 32 | .include <bsd.prog.mk> |
| 33 | diff -Naur ../proctools-0.4pre1/pkill/Makefile ./pkill/Makefile |
| 34 | --- pkill/Makefile 2003-12-06 10:18:39.000000000 +0100 |
| 35 | +++ pkill/Makefile 2008-06-01 10:27:40.000000000 +0200 |
| 36 | @@ -1,11 +1,6 @@ |
| 37 | PROG= pkill |
| 38 | DPADD+= ../proctools/libproctools.a |
| 39 | -LDADD= -L${MAKEOBJDIR} -lproctools -lkvm |
| 40 | +LDADD= -L${MAKEOBJDIR} -lproctools |
| 41 | CLEANFILES+= pkill.cat1 |
| 42 | |
| 43 | -.if defined(OLDKVM) |
| 44 | -BINGRP= kmem |
| 45 | -BINMODE= 2555 |
| 46 | -.endif |
| 47 | - |
| 48 | .include <bsd.prog.mk> |
| 49 | diff -Naur ../proctools-0.4pre1/proctools/Makefile ./proctools/Makefile |
| 50 | --- proctools/Makefile 2003-12-06 10:18:40.000000000 +0100 |
| 51 | +++ proctools/Makefile 2008-06-01 10:37:20.000000000 +0200 |
| 52 | @@ -4,10 +4,6 @@ |
| 53 | NOPIC= yes |
| 54 | NOLINT= yes |
| 55 | |
| 56 | -.if defined(OLDKVM) |
| 57 | -CFLAGS= -DUSE_KVM |
| 58 | -.endif |
| 59 | - |
| 60 | install: |
| 61 | |
| 62 | .include <bsd.lib.mk> |
| 63 | |
| 64 | diff -Naur ../proctools-0.4pre1/proctools/fmt.c ./proctools/fmt.c |
| 65 | --- proctools/fmt.c 2003-12-06 11:13:20.000000000 +0100 |
| 66 | +++ proctools/fmt.c 2008-06-01 10:19:49.000000000 +0200 |
| 67 | @@ -7,7 +7,6 @@ |
| 68 | #include <sys/sysctl.h> |
| 69 | #include <sys/user.h> |
| 70 | |
| 71 | -#include <kvm.h> |
| 72 | #include <stdio.h> |
| 73 | #include <stdlib.h> |
| 74 | #include <string.h> |
| 75 | @@ -27,30 +26,6 @@ |
| 76 | return ((cp = strrchr(arg0, '/')) != NULL ? cp + 1 : arg0); |
| 77 | } |
| 78 | |
| 79 | -void |
| 80 | -fmt_argv(kd, ki) |
| 81 | - kvm_t *kd; |
| 82 | - struct kinfo_proc *ki; |
| 83 | -{ |
| 84 | - int left = -1; /* no termwidth! */ |
| 85 | - char **argv, **p; |
| 86 | - if (kd != NULL) { |
| 87 | - argv = kvm_getargv(kd, ki, 0); |
| 88 | - if ((p = argv) != NULL) { |
| 89 | - while (*p) { |
| 90 | - fmt_puts(*p, &left); |
| 91 | - p++; |
| 92 | - fmt_putc(' ', &left); |
| 93 | - } |
| 94 | - } |
| 95 | - } |
| 96 | - if (argv == NULL || argv[0] == '\0' || |
| 97 | - strcmp(cmdpart(argv[0]), ki->kp_proc.p_comm)) { |
| 98 | - fmt_putc('(', &left); |
| 99 | - fmt_puts(ki->kp_proc.p_comm, &left); |
| 100 | - fmt_putc(')', &left); |
| 101 | - } |
| 102 | -} |
| 103 | |
| 104 | void |
| 105 | fmt_puts(s, leftp) |
| 106 | diff -Naur ../proctools-0.4pre1/proctools/proctools.c ./proctools/proctools.c |
| 107 | --- proctools/proctools.c 2003-12-06 12:41:26.000000000 +0100 |
| 108 | +++ proctools/proctools.c 2008-06-01 10:22:14.000000000 +0200 |
| 109 | @@ -23,7 +23,6 @@ |
| 110 | |
| 111 | extern char *cmdpart(char *); |
| 112 | extern void fmt_puts(char *, int *); |
| 113 | -extern void fmt_argv(kvm_t *kd, struct kinfo_proc *ki); |
| 114 | |
| 115 | static char dbuf[DUMPBUFSZ]; |
| 116 | |
| 117 | @@ -1088,18 +1087,6 @@ |
| 118 | static void |
| 119 | printProcInfoNative(struct baton *baton, const struct proctoolslist *proctoolslist) |
| 120 | { |
| 121 | -#if defined(USE_KVM) |
| 122 | - kvm_t *kd = baton->kd; |
| 123 | - struct kinfo_proc *ki; |
| 124 | - int nproc; |
| 125 | - if (kd == NULL) { |
| 126 | - printf("(null)"); |
| 127 | - } |
| 128 | - ki = kvm_getprocs(kd, KERN_PROC_PID, proctoolslist->pid, &nproc); |
| 129 | - if (nproc == 1 && ki != NULL) { |
| 130 | - fmt_argv(kd, ki); |
| 131 | - } |
| 132 | -#else |
| 133 | #if defined(KERN_PROCARGS2) |
| 134 | size_t len = baton->argmax; |
| 135 | |
| 136 | @@ -1150,7 +1137,6 @@ |
| 137 | #warning no KVM or sysctl known for proc arguments on this platform |
| 138 | printf("?"); |
| 139 | #endif |
| 140 | -#endif |
| 141 | } |
| 142 | |
| 143 | void |
| 144 | diff -Naur ../proctools-0.4pre1/proctools/proctools.h ./proctools/proctools.h |
| 145 | --- proctools/proctools.h 2003-12-06 12:12:04.000000000 +0100 |
| 146 | +++ proctools/proctools.h 2008-06-01 10:23:14.000000000 +0200 |
| 147 | @@ -5,7 +5,6 @@ |
| 148 | |
| 149 | #include <sys/cdefs.h> |
| 150 | #include <stdio.h> |
| 151 | -#include <kvm.h> |
| 152 | |
| 153 | #if !defined(USE_KVM) && !defined(USE_SYSCTL) |
| 154 | # if defined(KVM_NO_FILES) |
| 155 | @@ -71,16 +70,12 @@ |
| 156 | baton_type type; |
| 157 | int argmax; |
| 158 | char *args; |
| 159 | -#if defined(USE_KVM) |
| 160 | - kvm_t *kd; |
| 161 | -#else |
| 162 | struct kinfo_proc *kp; |
| 163 | # if defined(KERN_PROCARGS2) |
| 164 | int mib[4]; |
| 165 | int miblen; |
| 166 | int *pid; |
| 167 | # endif |
| 168 | -#endif |
| 169 | }; |
| 170 | |
| 171 | #define DUMPBUFSZ 8 |