summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/procmap/procmap.c12
-rw-r--r--usr.sbin/snmpd/mib.c22
2 files changed, 17 insertions, 17 deletions
diff --git a/usr.sbin/procmap/procmap.c b/usr.sbin/procmap/procmap.c
index ec0918e1f84..3de09fe1a9e 100644
--- a/usr.sbin/procmap/procmap.c
+++ b/usr.sbin/procmap/procmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procmap.c,v 1.36 2011/04/06 11:36:26 miod Exp $ */
+/* $OpenBSD: procmap.c,v 1.37 2011/04/10 03:20:59 guenther Exp $ */
/* $NetBSD: pmap.c,v 1.1 2002/09/01 20:32:44 atatat Exp $ */
/*
@@ -168,7 +168,7 @@ struct nlist nl[] = {
};
void load_symbols(kvm_t *);
-void process_map(kvm_t *, pid_t, struct kinfo_proc2 *, struct sum *);
+void process_map(kvm_t *, pid_t, struct kinfo_proc *, struct sum *);
size_t dump_vm_map_entry(kvm_t *, struct kbit *, struct kbit *, int,
struct sum *);
char *findname(kvm_t *, struct kbit *, struct kbit *, struct kbit *,
@@ -186,7 +186,7 @@ int
main(int argc, char *argv[])
{
char errbuf[_POSIX2_LINE_MAX], *kmem = NULL, *kernel = NULL;
- struct kinfo_proc2 *kproc;
+ struct kinfo_proc *kproc;
struct sum total_sum;
int many, ch, rc;
kvm_t *kd;
@@ -294,8 +294,8 @@ main(int argc, char *argv[])
if (pid == 0)
kproc = NULL;
else {
- kproc = kvm_getproc2(kd, KERN_PROC_PID, pid,
- sizeof(struct kinfo_proc2), &rc);
+ kproc = kvm_getprocs(kd, KERN_PROC_PID, pid,
+ sizeof(struct kinfo_proc), &rc);
if (kproc == NULL || rc == 0) {
errno = ESRCH;
warn("%d", pid);
@@ -345,7 +345,7 @@ print_sum(struct sum *sum, struct sum *total_sum)
}
void
-process_map(kvm_t *kd, pid_t pid, struct kinfo_proc2 *proc, struct sum *sum)
+process_map(kvm_t *kd, pid_t pid, struct kinfo_proc *proc, struct sum *sum)
{
struct kbit kbit[4], *vmspace, *vm_map, *header, *vm_map_entry;
struct vm_map_entry *last;
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c
index b7886bb548a..afaaab94819 100644
--- a/usr.sbin/snmpd/mib.c
+++ b/usr.sbin/snmpd/mib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mib.c,v 1.43 2010/10/15 11:56:13 sthen Exp $ */
+/* $OpenBSD: mib.c,v 1.44 2011/04/10 03:20:59 guenther Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net>
@@ -329,8 +329,8 @@ int mib_hrprocessor(struct oid *, struct ber_oid *, struct ber_element **);
int mib_hrswrun(struct oid *, struct ber_oid *, struct ber_element **);
int kinfo_proc_comp(const void *, const void *);
-int kinfo_proc(u_int32_t, struct kinfo_proc2 **);
-int kinfo_args(struct kinfo_proc2 *, char **);
+int kinfo_proc(u_int32_t, struct kinfo_proc **);
+int kinfo_args(struct kinfo_proc *, char **);
static struct oid hr_mib[] = {
{ MIB(host), OID_MIB },
@@ -607,7 +607,7 @@ int
mib_hrswrun(struct oid *oid, struct ber_oid *o, struct ber_element **elm)
{
struct ber_element *ber = *elm;
- struct kinfo_proc2 *kinfo;
+ struct kinfo_proc *kinfo;
char *s;
/* Get and verify the current row index */
@@ -681,20 +681,20 @@ mib_hrswrun(struct oid *oid, struct ber_oid *o, struct ber_element **elm)
int
kinfo_proc_comp(const void *a, const void *b)
{
- struct kinfo_proc2 * const *k1 = a;
- struct kinfo_proc2 * const *k2 = b;
+ struct kinfo_proc * const *k1 = a;
+ struct kinfo_proc * const *k2 = b;
return (((*k1)->p_pid > (*k2)->p_pid) ? 1 : -1);
}
int
-kinfo_proc(u_int32_t idx, struct kinfo_proc2 **kinfo)
+kinfo_proc(u_int32_t idx, struct kinfo_proc **kinfo)
{
- static struct kinfo_proc2 *kp = NULL;
+ static struct kinfo_proc *kp = NULL;
static size_t nkp = 0;
- int mib[] = { CTL_KERN, KERN_PROC2,
+ int mib[] = { CTL_KERN, KERN_PROC,
KERN_PROC_ALL, 0, sizeof(*kp), 0 };
- struct kinfo_proc2 **klist;
+ struct kinfo_proc **klist;
size_t size, count, i;
for (;;) {
@@ -744,7 +744,7 @@ kinfo_proc(u_int32_t idx, struct kinfo_proc2 **kinfo)
}
int
-kinfo_args(struct kinfo_proc2 *kinfo, char **s)
+kinfo_args(struct kinfo_proc *kinfo, char **s)
{
static char str[128];
static char *buf = NULL;