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

Function sys_fhstatfs

freebsd/kern/vfs_syscalls.c:4595–4611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4593};
4594#endif
4595int
4596sys_fhstatfs(struct thread *td, struct fhstatfs_args *uap)
4597{
4598 struct statfs *sfp;
4599 fhandle_t fh;
4600 int error;
4601
4602 error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t));
4603 if (error != 0)
4604 return (error);
4605 sfp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
4606 error = kern_fhstatfs(td, fh, sfp);
4607 if (error == 0)
4608 error = copyout(sfp, uap->buf, sizeof(*sfp));
4609 free(sfp, M_STATFS);
4610 return (error);
4611}
4612
4613int
4614kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf)

Callers

nothing calls this directly

Calls 5

mallocFunction · 0.85
kern_fhstatfsFunction · 0.85
freeFunction · 0.70
copyinFunction · 0.50
copyoutFunction · 0.50

Tested by

no test coverage detected