mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-06 09:17:25 +00:00
Don't give a warning about "proc size mismatch" if no struct were
returned. (This arose on a list about a month ago when someone found bogus warnings if they used "ps -Uuser_with_no_processes".) Approved by: mckusick
This commit is contained in:
parent
31a651fa98
commit
0627f53b57
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76182
@ -405,7 +405,8 @@ kvm_getprocs(kd, op, arg, cnt)
|
||||
_kvm_syserr(kd, kd->program, "kvm_getprocs");
|
||||
return (0);
|
||||
}
|
||||
if (kd->procbase->ki_structsize != sizeof(struct kinfo_proc)) {
|
||||
if (size > 0 &&
|
||||
kd->procbase->ki_structsize != sizeof(struct kinfo_proc)) {
|
||||
_kvm_err(kd, kd->program,
|
||||
"kinfo_proc size mismatch (expected %d, got %d)",
|
||||
sizeof(struct kinfo_proc),
|
||||
|
Loading…
Reference in New Issue
Block a user