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

Function kern_statfs

freebsd/kern/vfs_syscalls.c:326–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326int
327kern_statfs(struct thread *td, const char *path, enum uio_seg pathseg,
328 struct statfs *buf)
329{
330 struct mount *mp;
331 struct nameidata nd;
332 int error;
333
334 NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1,
335 pathseg, path, td);
336 error = namei(&nd);
337 if (error != 0)
338 return (error);
339 mp = nd.ni_vp->v_mount;
340 vfs_ref(mp);
341 NDFREE_NOTHING(&nd);
342 vput(nd.ni_vp);
343 return (kern_do_statfs(td, mp, buf));
344}
345
346/*
347 * Get filesystem statistics.

Callers 3

sys_statfsFunction · 0.85
freebsd4_statfsFunction · 0.85
freebsd11_statfsFunction · 0.85

Calls 5

nameiFunction · 0.85
vfs_refFunction · 0.85
NDFREE_NOTHINGFunction · 0.85
vputFunction · 0.85
kern_do_statfsFunction · 0.85

Tested by

no test coverage detected