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

Function freebsd11_fstatfs

freebsd/kern/vfs_syscalls.c:771–786  ·  view source on GitHub ↗

* Get filesystem statistics. */

Source from the content-addressed store, hash-verified

769 * Get filesystem statistics.
770 */
771int
772freebsd11_fstatfs(struct thread *td, struct freebsd11_fstatfs_args *uap)
773{
774 struct freebsd11_statfs osb;
775 struct statfs *sfp;
776 int error;
777
778 sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
779 error = kern_fstatfs(td, uap->fd, sfp);
780 if (error == 0) {
781 freebsd11_cvtstatfs(sfp, &osb);
782 error = copyout(&osb, uap->buf, sizeof(osb));
783 }
784 free(sfp, M_STATFS);
785 return (error);
786}
787
788/*
789 * Get statistics on all filesystems.

Callers

nothing calls this directly

Calls 5

mallocFunction · 0.85
kern_fstatfsFunction · 0.85
freebsd11_cvtstatfsFunction · 0.85
freeFunction · 0.70
copyoutFunction · 0.50

Tested by

no test coverage detected