dp 525 fs.c dirlookup(struct inode *dp, char *name, uint *poff) dp 530 fs.c if(dp->type != T_DIR) dp 533 fs.c for(off = 0; off < dp->size; off += sizeof(de)){ dp 534 fs.c if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) dp 543 fs.c return iget(dp->dev, inum); dp 552 fs.c dirlink(struct inode *dp, char *name, uint inum) dp 559 fs.c if((ip = dirlookup(dp, name, 0)) != 0){ dp 565 fs.c for(off = 0; off < dp->size; off += sizeof(de)){ dp 566 fs.c if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) dp 574 fs.c if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) dp 122 sysfile.c struct inode *dp, *ip; dp 144 sysfile.c if((dp = nameiparent(new, name)) == 0) dp 146 sysfile.c ilock(dp); dp 147 sysfile.c if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0){ dp 148 sysfile.c iunlockput(dp); dp 151 sysfile.c iunlockput(dp); dp 169 sysfile.c isdirempty(struct inode *dp) dp 174 sysfile.c for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){ dp 175 sysfile.c if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) dp 187 sysfile.c struct inode *ip, *dp; dp 196 sysfile.c if((dp = nameiparent(path, name)) == 0){ dp 201 sysfile.c ilock(dp); dp 207 sysfile.c if((ip = dirlookup(dp, name, &off)) == 0) dp 219 sysfile.c if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de)) dp 222 sysfile.c dp->nlink--; dp 223 sysfile.c iupdate(dp); dp 225 sysfile.c iunlockput(dp); dp 236 sysfile.c iunlockput(dp); dp 244 sysfile.c struct inode *ip, *dp; dp 247 sysfile.c if((dp = nameiparent(path, name)) == 0) dp 249 sysfile.c ilock(dp); dp 251 sysfile.c if((ip = dirlookup(dp, name, 0)) != 0){ dp 252 sysfile.c iunlockput(dp); dp 260 sysfile.c if((ip = ialloc(dp->dev, type)) == 0) dp 270 sysfile.c dp->nlink++; // for ".." dp 271 sysfile.c iupdate(dp); dp 273 sysfile.c if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0) dp 277 sysfile.c if(dirlink(dp, name, ip->inum) < 0) dp 280 sysfile.c iunlockput(dp);