dp 506 fs.c dirlookup(struct inode *dp, char *name, uint *poff) dp 511 fs.c if(dp->type != T_DIR) dp 514 fs.c for(off = 0; off < dp->size; off += sizeof(de)){ dp 515 fs.c if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) dp 524 fs.c return iget(dp->dev, inum); dp 533 fs.c dirlink(struct inode *dp, char *name, uint inum) dp 540 fs.c if((ip = dirlookup(dp, name, 0)) != 0){ dp 546 fs.c for(off = 0; off < dp->size; off += sizeof(de)){ dp 547 fs.c if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) dp 555 fs.c if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) dp 119 sysfile.c struct inode *dp, *ip; dp 141 sysfile.c if((dp = nameiparent(new, name)) == 0) dp 143 sysfile.c ilock(dp); dp 144 sysfile.c if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){ dp 145 sysfile.c iunlockput(dp); dp 148 sysfile.c iunlockput(dp); dp 166 sysfile.c isdirempty(struct inode *dp) dp 171 sysfile.c for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){ dp 172 sysfile.c if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) dp 184 sysfile.c struct inode *ip, *dp; dp 193 sysfile.c if((dp = nameiparent(path, name)) == 0){ dp 198 sysfile.c ilock(dp); dp 204 sysfile.c if((ip = dirlookup(dp, name, &off)) == 0) dp 216 sysfile.c if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) dp 219 sysfile.c dp->nlink--; dp 220 sysfile.c iupdate(dp); dp 222 sysfile.c iunlockput(dp); dp 233 sysfile.c iunlockput(dp); dp 242 sysfile.c struct inode *ip, *dp; dp 245 sysfile.c if((dp = nameiparent(path, name)) == 0) dp 247 sysfile.c ilock(dp); dp 249 sysfile.c if((ip = dirlookup(dp, name, &off)) != 0){ dp 250 sysfile.c iunlockput(dp); dp 258 sysfile.c if((ip = ialloc(dp->dev, type)) == 0) dp 268 sysfile.c dp->nlink++; // for ".." dp 269 sysfile.c iupdate(dp); dp 271 sysfile.c if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0) dp 275 sysfile.c if(dirlink(dp, name, ip->inum) < 0) dp 278 sysfile.c iunlockput(dp);