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

Function kern_linkat

freebsd/kern/vfs_syscalls.c:1548–1565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1546}
1547
1548int
1549kern_linkat(struct thread *td, int fd1, int fd2, const char *path1,
1550 const char *path2, enum uio_seg segflag, int follow)
1551{
1552 struct nameidata nd;
1553 int error;
1554
1555 do {
1556 bwillwrite();
1557 NDINIT_ATRIGHTS(&nd, LOOKUP, follow | AUDITVNODE1, segflag,
1558 path1, fd1, &cap_linkat_source_rights, td);
1559 if ((error = namei(&nd)) != 0)
1560 return (error);
1561 NDFREE(&nd, NDF_ONLY_PNBUF);
1562 error = kern_linkat_vp(td, nd.ni_vp, fd2, path2, segflag);
1563 } while (error == EAGAIN || error == ERELOOKUP);
1564 return (error);
1565}
1566
1567static int
1568kern_linkat_vp(struct thread *td, struct vnode *vp, int fd, const char *path,

Callers 2

sys_linkFunction · 0.85
sys_linkatFunction · 0.85

Calls 4

nameiFunction · 0.85
NDFREEFunction · 0.85
kern_linkat_vpFunction · 0.85
bwillwriteFunction · 0.70

Tested by

no test coverage detected