Changes in uspace/srv/fs/mfs/mfs_dentry.c [6d4d883:f7d6b30] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/mfs/mfs_dentry.c
r6d4d883 rf7d6b30 44 44 int 45 45 mfs_read_dentry(struct mfs_node *mnode, 46 struct mfs_dentry_info *d_info, unsigned index)46 struct mfs_dentry_info *d_info, unsigned index) 47 47 { 48 48 const struct mfs_instance *inst = mnode->instance; … … 57 57 58 58 if (block == 0) { 59 /* End of the dentries list*/59 /*End of the dentries list*/ 60 60 r = EOK; 61 61 goto out_err; … … 79 79 } else { 80 80 const int namelen = longnames ? MFS_L_MAX_NAME_LEN : 81 MFS_MAX_NAME_LEN;81 MFS_MAX_NAME_LEN; 82 82 83 83 struct mfs_dentry *d; 84 84 85 85 d = b->data + dentry_off * (longnames ? MFSL_DIRSIZE : 86 MFS_DIRSIZE);86 MFS_DIRSIZE); 87 87 d_info->d_inum = conv16(sbi->native, d->d_inum); 88 88 memcpy(d_info->d_name, d->d_name, namelen); … … 101 101 /**Write a directory entry on disk. 102 102 * 103 * @param d_info 104 * 105 * @return 103 * @param d_info Pointer to the directory entry structure to write on disk. 104 * 105 * @return EOK on success or a negative error code. 106 106 */ 107 107 int … … 178 178 179 179 if (name_len == d_name_len && 180 !bcmp(d_info.d_name, d_name, name_len)) { 181 180 !bcmp(d_info.d_name, d_name, name_len)) { 182 181 d_info.d_inum = 0; 183 182 r = mfs_write_dentry(&d_info); … … 198 197 */ 199 198 int 200 mfs_insert_dentry(struct mfs_node *mnode, const char *d_name, 201 fs_index_t d_inum) 199 mfs_insert_dentry(struct mfs_node *mnode, const char *d_name, fs_index_t d_inum) 202 200 { 203 201 int r; … … 211 209 return ENAMETOOLONG; 212 210 213 /* Search for an empty dentry*/211 /*Search for an empty dentry*/ 214 212 unsigned i; 215 213 for (i = 0; i < mnode->ino_i->i_size / sbi->dirsize; ++i) { … … 219 217 220 218 if (d_info.d_inum == 0) { 221 /* This entry is not used*/219 /*This entry is not used*/ 222 220 empty_dentry_found = true; 223 221 break; … … 233 231 234 232 if (b == 0) { 235 /* Increase the inode size*/233 /*Increase the inode size*/ 236 234 237 235 uint32_t dummy;
Note:
See TracChangeset
for help on using the changeset viewer.