MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sysctl_out_proc

Function sysctl_out_proc

freebsd/kern/kern_proc.c:1548–1568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1546}
1547
1548static int
1549sysctl_out_proc(struct proc *p, struct sysctl_req *req, int flags)
1550{
1551 struct sbuf sb;
1552 struct kinfo_proc ki;
1553 int error, error2;
1554
1555 if (req->oldptr == NULL)
1556 return (SYSCTL_OUT(req, 0, kern_proc_out_size(p, flags)));
1557
1558 sbuf_new_for_sysctl(&sb, (char *)&ki, sizeof(ki), req);
1559 sbuf_clear_flags(&sb, SBUF_INCLUDENUL);
1560 error = kern_proc_out(p, &sb, flags);
1561 error2 = sbuf_finish(&sb);
1562 sbuf_delete(&sb);
1563 if (error != 0)
1564 return (error);
1565 else if (error2 != 0)
1566 return (error2);
1567 return (0);
1568}
1569
1570int
1571proc_iterate(int (*cb)(struct proc *, void *), void *cbarg)

Callers 2

sysctl_kern_proc_iterateFunction · 0.85
sysctl_kern_procFunction · 0.85

Calls 6

kern_proc_out_sizeFunction · 0.85
sbuf_new_for_sysctlFunction · 0.85
sbuf_clear_flagsFunction · 0.85
kern_proc_outFunction · 0.85
sbuf_finishFunction · 0.85
sbuf_deleteFunction · 0.85

Tested by

no test coverage detected