diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-03-12 04:54:29 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-03-12 04:54:29 +0000 |
commit | a79766e940b76ce3fc27af710b45145c5a8c3edf (patch) | |
tree | d1d61b3bbff4cd49d452a09b222d58400643b4ab /bin | |
parent | 0b04a0ec6ae4d56e31d9ced0bf6fc0178f67fc67 (diff) |
Replace the old, broken KERN_PROC ABI and its matching functions
in libkvm with the stable-ABI versions that are currently named
KERN_PROC2, kvm_get{proc,argv,envv}2(). The latter names and symbols
will continue to be supported for a few releases.
Committing now that they ports people have had a couple releases
to update pkgs that usd the old functions
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ps/keyword.c | 6 | ||||
-rw-r--r-- | bin/ps/print.c | 13 |
2 files changed, 5 insertions, 14 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index bf475952ee1..6e98d750cb5 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keyword.c,v 1.30 2010/02/14 00:17:14 guenther Exp $ */ +/* $OpenBSD: keyword.c,v 1.31 2011/03/12 04:54:28 guenther Exp $ */ /* $NetBSD: keyword.c,v 1.12.6.1 1996/05/30 21:25:13 cgd Exp $ */ /*- @@ -90,7 +90,7 @@ VAR var[] = { {"cpuid", "CPUID", NULL, 0, pvar, 8, 0, POFF(p_cpuid), UINT64, "lld"}, {"cputime", "", "time"}, {"dsiz", "DSIZ", NULL, 0, dsize, 4}, - {"emul", "EMUL", NULL, LJUST, emulname, EMULNAMELEN}, + {"emul", "EMUL", NULL, LJUST, emulname, KI_EMULNAMELEN - 1}, {"etime", "", "start"}, {"f", "F", NULL, 0, pvar, 7, 0, POFF(p_flag), INT32, "x"}, {"flags", "", "f"}, @@ -171,7 +171,7 @@ VAR var[] = { {"usrpri", "", "upr"}, {"vsize", "", "vsz"}, {"vsz", "VSZ", NULL, 0, vsize, 5}, - {"wchan", "WCHAN", NULL, LJUST, wchan, 7}, + {"wchan", "WCHAN", NULL, LJUST, wchan, KI_WMESGLEN - 1}, {"xstat", "XSTAT", NULL, 0, pvar, 4, 0, POFF(p_xstat), UINT16, "x"}, {""}, }; diff --git a/bin/ps/print.c b/bin/ps/print.c index f9c37f2337c..4a5c62267cd 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.46 2010/02/14 00:17:14 guenther Exp $ */ +/* $OpenBSD: print.c,v 1.47 2011/03/12 04:54:28 guenther Exp $ */ /* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */ /*- @@ -432,16 +432,7 @@ wchan(const struct kinfo_proc2 *kp, VARENT *ve) v = ve->var; if (kp->p_wchan) { - int n; - - if (kp->p_wmesg) { - n = min(v->width, WMESGLEN); - (void)printf("%-*.*s", n, n, kp->p_wmesg); - if (v->width > n) - (void)printf("%*s", v->width - n, ""); - } else - (void)printf("%-*lx", v->width, - (long)kp->p_wchan &~ KERNBASE); + (void)printf("%-*s", (int)v->width, kp->p_wmesg); } else (void)printf("%-*s", v->width, "-"); } |