]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix kvm_getprocs(3) error reporting in ps(1).
authortrasz <trasz@FreeBSD.org>
Fri, 6 Oct 2017 15:09:28 +0000 (15:09 +0000)
committertrasz <trasz@FreeBSD.org>
Fri, 6 Oct 2017 15:09:28 +0000 (15:09 +0000)
commita1414b282eac9cca5bfac3353e99f2654e99b394
tree88e9e7866aa70d58de9d8bba63ae8e8d15140f23
parent52a8a4f4909274f02713e2786a658e19db06ad01
Fix kvm_getprocs(3) error reporting in ps(1).

Previously it just didn't work at all - kvm_getprocs(3) doesn't update
the &nentries when it returns NULL.  The end result was that ps(1) showed
garbage data instead of reporting kinfo_proc size mismatch.

Reviewed by: cem
Obtained from: CheriBSD
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D12414
bin/ps/ps.c