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
f00ce688f2
commit
32ae974b98
@ -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