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

Function freebsd11_statfs

freebsd/kern/vfs_syscalls.c:751–766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749static void freebsd11_cvtstatfs(struct statfs *, struct freebsd11_statfs *);
750
751int
752freebsd11_statfs(struct thread *td, struct freebsd11_statfs_args *uap)
753{
754 struct freebsd11_statfs osb;
755 struct statfs *sfp;
756 int error;
757
758 sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
759 error = kern_statfs(td, uap->path, UIO_USERSPACE, sfp);
760 if (error == 0) {
761 freebsd11_cvtstatfs(sfp, &osb);
762 error = copyout(&osb, uap->buf, sizeof(osb));
763 }
764 free(sfp, M_STATFS);
765 return (error);
766}
767
768/*
769 * Get filesystem statistics.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected