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

Function freebsd4_fstatfs

freebsd/kern/vfs_syscalls.c:623–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

621};
622#endif
623int
624freebsd4_fstatfs(struct thread *td, struct freebsd4_fstatfs_args *uap)
625{
626 struct ostatfs osb;
627 struct statfs *sfp;
628 int error;
629
630 sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
631 error = kern_fstatfs(td, uap->fd, sfp);
632 if (error == 0) {
633 freebsd4_cvtstatfs(sfp, &osb);
634 error = copyout(&osb, uap->buf, sizeof(osb));
635 }
636 free(sfp, M_STATFS);
637 return (error);
638}
639
640/*
641 * Get statistics on all filesystems.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected