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

Function sys_statfs

freebsd/kern/vfs_syscalls.c:312–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310};
311#endif
312int
313sys_statfs(struct thread *td, struct statfs_args *uap)
314{
315 struct statfs *sfp;
316 int error;
317
318 sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
319 error = kern_statfs(td, uap->path, UIO_USERSPACE, sfp);
320 if (error == 0)
321 error = copyout(sfp, uap->buf, sizeof(struct statfs));
322 free(sfp, M_STATFS);
323 return (error);
324}
325
326int
327kern_statfs(struct thread *td, const char *path, enum uio_seg pathseg,

Callers

nothing calls this directly

Calls 4

mallocFunction · 0.85
kern_statfsFunction · 0.85
freeFunction · 0.70
copyoutFunction · 0.50

Tested by

no test coverage detected