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

Function proc_read_string

freebsd/kern/kern_proc.c:1798–1813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1796}
1797
1798static int
1799proc_read_string(struct thread *td, struct proc *p, const char *sptr, char *buf,
1800 size_t len)
1801{
1802 ssize_t n;
1803
1804 /*
1805 * This may return a short read if the string is shorter than the chunk
1806 * and is aligned at the end of the page, and the following page is not
1807 * mapped.
1808 */
1809 n = proc_readmem(td, p, (vm_offset_t)sptr, buf, len);
1810 if (n <= 0)
1811 return (ENOMEM);
1812 return (0);
1813}
1814
1815#define PROC_AUXV_MAX 256 /* Safety limit on auxv size. */
1816

Callers 1

get_ps_stringsFunction · 0.85

Calls 1

proc_readmemFunction · 0.85

Tested by

no test coverage detected