/openbsd/sys/kern/ |
H A D | vfs_lookup.c | 65 cnp->cn_rpbuf[cnp->cn_rpi++] = '/'; in component_push() 66 memcpy(cnp->cn_rpbuf + cnp->cn_rpi, component, len); in component_push() 68 cnp->cn_rpbuf[cnp->cn_rpi] = '\0'; in component_push() 75 while(cnp->cn_rpi && cnp->cn_rpbuf[cnp->cn_rpi] != '/' ) in component_pop() 77 if (cnp->cn_rpi == 0 && cnp->cn_rpbuf[0] == '/') in component_pop() 79 cnp->cn_rpbuf[cnp->cn_rpi] = '\0'; in component_pop() 131 if (!cnp->cn_cred || !cnp->cn_proc) in namei() 170 ktrnamei(cnp->cn_proc, cnp->cn_pnbuf); in namei() 248 cnp->cn_nameptr = cnp->cn_pnbuf; in namei() 463 cnp->cn_namelen = cp - cnp->cn_nameptr; in vfs_lookup() [all …]
|
H A D | vfs_cache.c | 139 struct componentname *cnp) in cache_lookup() argument 150 cnp->cn_flags &= ~MAKEENTRY; in cache_lookup() 155 cnp->cn_flags &= ~MAKEENTRY; in cache_lookup() 160 n.nc_nlen = cnp->cn_namelen; in cache_lookup() 172 if (cnp->cn_nameiop != CREATE || in cache_lookup() 206 } else if (cnp->cn_flags & ISDOTDOT) { in cache_lookup() 208 cnp->cn_flags |= PDIRUNLOCK; in cache_lookup() 219 cnp->cn_flags &= ~PDIRUNLOCK; in cache_lookup() 229 cnp->cn_flags |= PDIRUNLOCK; in cache_lookup() 252 cnp->cn_flags &= ~PDIRUNLOCK; in cache_lookup() [all …]
|
H A D | vfs_vops.c | 75 struct componentname *cnp) in VOP_LOOKUP() argument 80 a.a_cnp = cnp; in VOP_LOOKUP() 90 struct componentname *cnp, struct vattr *vap) in VOP_CREATE() argument 95 a.a_cnp = cnp; in VOP_CREATE() 113 a.a_cnp = cnp; in VOP_MKNOD() 326 a.a_cnp = cnp; in VOP_REMOVE() 348 a.a_cnp = cnp; in VOP_LINK() 386 a.a_cnp = cnp; in VOP_MKDIR() 403 a.a_cnp = cnp; in VOP_RMDIR() 423 a.a_cnp = cnp; in VOP_SYMLINK() [all …]
|
/openbsd/sys/miscfs/fuse/ |
H A D | fuse_lookup.c | 45 struct proc *p = cnp->cn_proc; in fusefs_lookup() 50 int nameiop = cnp->cn_nameiop; in fusefs_lookup() 54 flags = cnp->cn_flags; in fusefs_lookup() 66 (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) in fusefs_lookup() 69 if (cnp->cn_namelen == 1 && *(cnp->cn_nameptr) == '.') { in fusefs_lookup() 79 memcpy(fbuf->fb_dat, cnp->cn_nameptr, cnp->cn_namelen); in fusefs_lookup() 98 cnp->cn_proc)) != 0) in fusefs_lookup() 101 cnp->cn_flags |= SAVENAME; in fusefs_lookup() 127 cnp->cn_flags |= SAVENAME; in fusefs_lookup() 146 cnp->cn_flags |= SAVENAME; in fusefs_lookup() [all …]
|
H A D | fuse_vnops.c | 640 VOP_ABORTOP(dvp, cnp); in fusefs_link() 645 VOP_ABORTOP(dvp, cnp); in fusefs_link() 650 VOP_ABORTOP(dvp, cnp); in fusefs_link() 658 memcpy(fbuf->fb_dat, cnp->cn_nameptr, cnp->cn_namelen); in fusefs_link() 718 memcpy(fbuf->fb_dat, cnp->cn_nameptr, cnp->cn_namelen); in fusefs_symlink() 993 VOP_ABORTOP(dvp, cnp); in fusefs_create() 1007 memcpy(fbuf->fb_dat, cnp->cn_nameptr, cnp->cn_namelen); in fusefs_create() 1066 memcpy(fbuf->fb_dat, cnp->cn_nameptr, cnp->cn_namelen); in fusefs_mknod() 1381 memcpy(fbuf->fb_dat, cnp->cn_nameptr, cnp->cn_namelen); in fusefs_mkdir() 1440 memcpy(fbuf->fb_dat, cnp->cn_nameptr, cnp->cn_namelen); in fusefs_rmdir() [all …]
|
/openbsd/sys/msdosfs/ |
H A D | msdosfs_lookup.c | 117 flags = cnp->cn_flags; in msdosfs_lookup() 137 if ((error = VOP_ACCESS(vdp, VEXEC, cnp->cn_cred, cnp->cn_proc)) != 0) in msdosfs_lookup() 157 (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.'))) { in msdosfs_lookup() 174 wincnt = winSlotCnt((u_char *)cnp->cn_nameptr, cnp->cn_namelen) + 1; in msdosfs_lookup() 178 wincnt = winSlotCnt((u_char *)cnp->cn_nameptr, cnp->cn_namelen) + 1; in msdosfs_lookup() 213 adjp = cnp->cn_nameptr; in msdosfs_lookup() 377 error = VOP_ACCESS(vdp, VWRITE, cnp->cn_cred, cnp->cn_proc); in msdosfs_lookup() 476 error = VOP_ACCESS(vdp, VWRITE, cnp->cn_cred, cnp->cn_proc); in msdosfs_lookup() 510 error = VOP_ACCESS(vdp, VWRITE, cnp->cn_cred, cnp->cn_proc); in msdosfs_lookup() 625 cnp->cn_proc); in createde() [all …]
|
H A D | msdosfs_fat.c | 156 if (bnp == NULL && cnp == NULL && sp == NULL) in pcbmap() 169 if (cnp) in pcbmap() 170 *cnp = de_bn2cn(pmp, pmp->pm_rootdirsize); in pcbmap() 175 if (cnp) in pcbmap() 176 *cnp = MSDOSFSROOT; in pcbmap() 182 if (cnp) in pcbmap() 183 *cnp = 0; in pcbmap() 256 if (cnp) in pcbmap() 257 *cnp = cn; in pcbmap() 263 if (cnp) in pcbmap() [all …]
|
H A D | msdosfs_vnops.c | 115 struct componentname *cnp = ap->a_cnp; in msdosfs_create() local 144 if ((cnp->cn_flags & HASBUF) == 0) in msdosfs_create() 163 if ((cnp->cn_flags & SAVESTART) == 0) in msdosfs_create() 164 pool_put(&namei_pool, cnp->cn_pnbuf); in msdosfs_create() 170 pool_put(&namei_pool, cnp->cn_pnbuf); in msdosfs_create() 1229 struct componentname *cnp = ap->a_cnp; in msdosfs_mkdir() local 1307 if ((cnp->cn_flags & HASBUF) == 0) in msdosfs_mkdir() 1320 if ((cnp->cn_flags & SAVESTART) == 0) in msdosfs_mkdir() 1321 pool_put(&namei_pool, cnp->cn_pnbuf); in msdosfs_mkdir() 1330 pool_put(&namei_pool, cnp->cn_pnbuf); in msdosfs_mkdir() [all …]
|
/openbsd/sys/isofs/cd9660/ |
H A D | cd9660_lookup.c | 123 int nameiop = cnp->cn_nameiop; in cd9660_lookup() 125 cnp->cn_flags &= ~PDIRUNLOCK; in cd9660_lookup() 126 flags = cnp->cn_flags; in cd9660_lookup() 142 (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) in cd9660_lookup() 155 len = cnp->cn_namelen; in cd9660_lookup() 156 name = cnp->cn_nameptr; in cd9660_lookup() 333 if (cnp->cn_flags & MAKEENTRY) in cd9660_lookup() 334 cache_enter(vdp, *vpp, cnp); in cd9660_lookup() 378 cnp->cn_flags |= PDIRUNLOCK; in cd9660_lookup() 406 cnp->cn_flags |= PDIRUNLOCK; in cd9660_lookup() [all …]
|
/openbsd/sys/ufs/ext2fs/ |
H A D | ext2fs_lookup.c | 250 int flags = cnp->cn_flags; in ext2fs_lookup() 251 int nameiop = cnp->cn_nameiop; in ext2fs_lookup() 273 (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) in ext2fs_lookup() 429 cnp->cn_flags |= SAVENAME; in ext2fs_lookup() 440 cache_enter(vdp, *vpp, cnp); in ext2fs_lookup() 538 cnp->cn_flags |= SAVENAME; in ext2fs_lookup() 568 cnp->cn_flags |= PDIRUNLOCK; in ext2fs_lookup() 599 cache_enter(vdp, *vpp, cnp); in ext2fs_lookup() 749 struct componentname *cnp) in ext2fs_direnter() argument 776 memcpy(newdir.e2d_name, cnp->cn_nameptr, (unsigned)cnp->cn_namelen + 1); in ext2fs_direnter() [all …]
|
H A D | ext2fs_vnops.c | 425 struct componentname *cnp = ap->a_cnp; in ext2fs_link() local 430 if ((cnp->cn_flags & HASBUF) == 0) in ext2fs_link() 434 VOP_ABORTOP(dvp, cnp); in ext2fs_link() 439 VOP_ABORTOP(dvp, cnp); in ext2fs_link() 444 VOP_ABORTOP(dvp, cnp); in ext2fs_link() 457 pool_put(&namei_pool, cnp->cn_pnbuf); in ext2fs_link() 882 if ((cnp->cn_flags & HASBUF) == 0) in ext2fs_mkdir() 1019 error = ext2fs_dirremove(dvp, cnp); in ext2fs_rmdir() 1139 struct componentname *cnp) in ext2fs_makeinode() argument 1147 if ((cnp->cn_flags & HASBUF) == 0) in ext2fs_makeinode() [all …]
|
H A D | ext2fs_extern.h | 138 struct componentname *cnp);
|
/openbsd/sys/ufs/ufs/ |
H A D | ufs_lookup.c | 128 int nameiop = cnp->cn_nameiop; in ufs_lookup() 130 cnp->cn_flags &= ~PDIRUNLOCK; in ufs_lookup() 131 flags = cnp->cn_flags; in ufs_lookup() 150 (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) in ufs_lookup() 175 cnp->cn_namelen + 3) &~ 3; in ufs_lookup() 214 switch (ufsdirhash_lookup(dp, cnp->cn_nameptr, cnp->cn_namelen, in ufs_lookup() 413 cnp->cn_flags |= SAVENAME; in ufs_lookup() 524 cnp->cn_flags |= SAVENAME; in ufs_lookup() 660 memcpy(newdirp->d_name, cnp->cn_nameptr, cnp->cn_namelen); in ufs_makedirentry() 688 cr = cnp->cn_cred; in ufs_direnter() [all …]
|
H A D | ufs_vnops.c | 616 if ((cnp->cn_flags & HASBUF) == 0) in ufs_link() 620 VOP_ABORTOP(dvp, cnp); in ufs_link() 625 VOP_ABORTOP(dvp, cnp); in ufs_link() 630 VOP_ABORTOP(dvp, cnp); in ufs_link() 638 ufs_makedirentry(ip, cnp, &newdir); in ufs_link() 1097 if ((cnp->cn_flags & HASBUF) == 0) in ufs_mkdir() 1178 ufs_makedirentry(ip, cnp, &newdir); in ufs_mkdir() 1266 cnp->cn_cred); in ufs_rmdir() 1712 struct componentname *cnp) in ufs_makeinode() argument 1721 if ((cnp->cn_flags & HASBUF) == 0) in ufs_makeinode() [all …]
|
/openbsd/sys/nfs/ |
H A D | nfs_vnops.c | 876 err2 = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, cnp->cn_proc); in nfs_lookup() 1477 if (nfsm_strtom(&info, cnp->cn_nameptr, cnp->cn_namelen, in nfs_mknodrpc() 1509 cnp->cn_namelen, cnp->cn_cred, cnp->cn_proc, &np); in nfs_mknodrpc() 1589 if (nfsm_strtom(&info, cnp->cn_nameptr, cnp->cn_namelen, in nfs_create() 1621 cnp->cn_namelen, cnp->cn_cred, cnp->cn_proc, &np); in nfs_create() 1708 error = nfs_vinvalbuf(vp, 0, cnp->cn_cred, cnp->cn_proc); in nfs_remove() 1712 cnp->cn_namelen, cnp->cn_cred, cnp->cn_proc); in nfs_remove() 1937 VOP_FSYNC(vp, cnp->cn_cred, MNT_WAIT, cnp->cn_proc); in nfs_link() 1944 if (nfsm_strtom(&info, cnp->cn_nameptr, cnp->cn_namelen, in nfs_link() 1997 if (nfsm_strtom(&info, cnp->cn_nameptr, cnp->cn_namelen, in nfs_symlink() [all …]
|
H A D | nfs_subs.c | 1179 struct componentname *cnp = &ndp->ni_cnd; in nfs_namei() local 1188 tocp = cnp->cn_pnbuf; in nfs_namei() 1218 ndp->ni_pathlen = tocp - cnp->cn_pnbuf; in nfs_namei() 1219 cnp->cn_nameptr = cnp->cn_pnbuf; in nfs_namei() 1236 cnp->cn_flags |= (NOCROSSMOUNT | RDONLY); in nfs_namei() 1238 cnp->cn_flags |= NOCROSSMOUNT; in nfs_namei() 1243 cnp->cn_proc = p; in nfs_namei() 1250 if (cnp->cn_flags & ISSYMLINK) { in nfs_namei() 1263 if (cnp->cn_flags & (SAVENAME | SAVESTART)) { in nfs_namei() 1264 cnp->cn_flags |= HASBUF; in nfs_namei() [all …]
|
/openbsd/sys/ntfs/ |
H A D | ntfs_vnops.c | 530 struct ucred *cred = cnp->cn_cred; in ntfs_lookup() 537 (unsigned int)cnp->cn_namelen, cnp->cn_nameptr, cnp->cn_namelen, in ntfs_lookup() 544 if ((cnp->cn_flags & ISLASTCN) && in ntfs_lookup() 545 (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) in ntfs_lookup() 559 if(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { in ntfs_lookup() 573 cnp->cn_flags |= PDIRUNLOCK; in ntfs_lookup() 586 cnp->cn_flags &= ~PDIRUNLOCK; in ntfs_lookup() 596 cnp->cn_flags &= ~PDIRUNLOCK; in ntfs_lookup() 610 cnp->cn_flags |= PDIRUNLOCK; in ntfs_lookup() 614 if (cnp->cn_flags & MAKEENTRY) in ntfs_lookup() [all …]
|
H A D | ntfs_subr.c | 825 struct componentname *cnp, struct vnode **vpp) in ntfs_ntlookupfile() argument 860 fname = cnp->cn_nameptr; in ntfs_ntlookupfile() 863 for (fnamelen = 0; fnamelen < cnp->cn_namelen; fnamelen++) in ntfs_ntlookupfile() 866 anamelen = cnp->cn_namelen - fnamelen - 1; in ntfs_ntlookupfile() 1067 if ((cnp->cn_flags & ISLASTCN) && in ntfs_ntlookupfile() 1068 (cnp->cn_nameiop == CREATE || cnp->cn_nameiop == RENAME)) in ntfs_ntlookupfile()
|
/openbsd/sys/tmpfs/ |
H A D | tmpfs_vnops.c | 127 cnp->cn_flags &= ~PDIRUNLOCK; in tmpfs_lookup() 141 (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) { in tmpfs_lookup() 169 cnp->cn_flags |= SAVENAME; in tmpfs_lookup() 194 } else if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { in tmpfs_lookup() 228 cnp->cn_flags |= SAVENAME; in tmpfs_lookup() 249 if (lastcn && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) { in tmpfs_lookup() 274 cnp->cn_flags |= SAVENAME; in tmpfs_lookup() 285 if ((cnp->cn_flags & MAKEENTRY) && cnp->cn_nameiop != CREATE) { in tmpfs_lookup() 286 cache_enter(dvp, *vpp, cnp); in tmpfs_lookup() 792 cnp->cn_nameptr, cnp->cn_namelen, &de); in tmpfs_link() [all …]
|
H A D | tmpfs_subr.c | 370 struct componentname *cnp, char *target) in tmpfs_alloc_file() argument 401 error = tmpfs_alloc_node(tmp, vap->va_type, cnp->cn_cred->cr_uid, in tmpfs_alloc_file() 407 error = tmpfs_alloc_dirent(tmp, cnp->cn_nameptr, cnp->cn_namelen, &de); in tmpfs_alloc_file() 426 if (error == 0 && (cnp->cn_flags & SAVESTART) == 0) in tmpfs_alloc_file() 427 pool_put(&namei_pool, cnp->cn_pnbuf); in tmpfs_alloc_file() 582 tmpfs_dir_lookup(tmpfs_node_t *node, struct componentname *cnp) in tmpfs_dir_lookup() argument 584 const char *name = cnp->cn_nameptr; in tmpfs_dir_lookup() 585 const uint16_t nlen = cnp->cn_namelen; in tmpfs_dir_lookup()
|
/openbsd/usr.sbin/makefs/msdos/ |
H A D | msdosfs_lookup.c | 70 createde(struct denode *dep, struct denode *ddep, struct denode **depp, struct componentname *cnp) in createde() argument 84 dep, ddep, depp, cnp); in createde() 135 u_char *un = cnp->cn_nameptr; in createde() 136 int unlen = cnp->cn_namelen; in createde() 305 uniqdosname(struct denode *dep, struct componentname *cnp, u_char *cp) in uniqdosname() argument 320 if (!unix2dosfn(cnp->cn_nameptr, cp, cnp->cn_namelen, gen)) in uniqdosname()
|
H A D | msdosfs_vnops.c | 118 msdosfs_findslot(struct denode *dp, struct componentname *cnp) in msdosfs_findslot() argument 139 switch (unix2dosfn(cnp->cn_nameptr, dosfilename, cnp->cn_namelen, 0)) { in msdosfs_findslot() 145 wincnt = winSlotCnt(cnp->cn_nameptr, cnp->cn_namelen) + 1; in msdosfs_findslot() 149 wincnt = winSlotCnt(cnp->cn_nameptr, cnp->cn_namelen) + 1; in msdosfs_findslot() 230 chksum = winChkName(cnp->cn_nameptr, in msdosfs_findslot() 231 cnp->cn_namelen, in msdosfs_findslot()
|
H A D | msdosfs_fat.c | 166 if (bnp == NULL && cnp == NULL && sp == NULL) in pcbmap() 180 if (cnp) in pcbmap() 181 *cnp = de_bn2cn(pmp, pmp->pm_rootdirsize); in pcbmap() 188 if (cnp) in pcbmap() 189 *cnp = MSDOSFSROOT; in pcbmap() 198 if (cnp) in pcbmap() 199 *cnp = 0; in pcbmap() 287 if (cnp) in pcbmap() 288 *cnp = cn; in pcbmap() 296 if (cnp) in pcbmap() [all …]
|
/openbsd/sys/sys/ |
H A D | namei.h | 195 struct componentname *cnp);
|
/openbsd/gnu/usr.bin/binutils-2.17/cpu/ |
H A D | cris.cpu | 501 np cnp vnp cvnp znp cznp vznp cvznp
|