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

Function kern_chflagsat

freebsd/kern/vfs_syscalls.c:2739–2756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2737}
2738
2739static int
2740kern_chflagsat(struct thread *td, int fd, const char *path,
2741 enum uio_seg pathseg, u_long flags, int atflag)
2742{
2743 struct nameidata nd;
2744 int error;
2745
2746 AUDIT_ARG_FFLAGS(flags);
2747 NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(atflag, AT_SYMLINK_NOFOLLOW |
2748 AT_RESOLVE_BENEATH) | AUDITVNODE1, pathseg, path, fd,
2749 &cap_fchflags_rights, td);
2750 if ((error = namei(&nd)) != 0)
2751 return (error);
2752 NDFREE_NOTHING(&nd);
2753 error = setfflags(td, nd.ni_vp, flags);
2754 vrele(nd.ni_vp);
2755 return (error);
2756}
2757
2758/*
2759 * Change flags of a file given a file descriptor.

Callers 3

sys_chflagsFunction · 0.85
sys_chflagsatFunction · 0.85
sys_lchflagsFunction · 0.85

Calls 5

at2cnpflagsFunction · 0.85
nameiFunction · 0.85
NDFREE_NOTHINGFunction · 0.85
setfflagsFunction · 0.85
vreleFunction · 0.70

Tested by

no test coverage detected