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

Function freebsd4_statfs

freebsd/kern/vfs_syscalls.c:597–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595};
596#endif
597int
598freebsd4_statfs(struct thread *td, struct freebsd4_statfs_args *uap)
599{
600 struct ostatfs osb;
601 struct statfs *sfp;
602 int error;
603
604 sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
605 error = kern_statfs(td, uap->path, UIO_USERSPACE, sfp);
606 if (error == 0) {
607 freebsd4_cvtstatfs(sfp, &osb);
608 error = copyout(&osb, uap->buf, sizeof(osb));
609 }
610 free(sfp, M_STATFS);
611 return (error);
612}
613
614/*
615 * Get filesystem statistics.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected