Lines Matching defs:fdirent
163 struct chfs_flash_dirent_node *fdirent;
174 fdirent = chfs_alloc_flash_dirent();
175 if (!fdirent)
178 size = sizeof(*fdirent) + fd->nsize;
179 namelen = CHFS_PAD(size) - sizeof(*fdirent);
184 fdirent->magic = htole16(CHFS_FS_MAGIC_BITMASK);
185 fdirent->type = htole16(CHFS_NODETYPE_DIRENT);
186 fdirent->length = htole32(CHFS_PAD(size));
187 fdirent->hdr_crc = htole32(crc32(0, (uint8_t *)fdirent,
189 fdirent->vno = htole64(ino);
190 fdirent->pvno = htole64(pdir->ino);
191 fdirent->version = htole64(++pdir->chvc->highest_version);
192 fdirent->mctime = ip?ip->ctime:0;
193 fdirent->nsize = fd->nsize;
194 fdirent->dtype = fd->type;
195 fdirent->name_crc = crc32(0, (uint8_t *)&(fd->name), fd->nsize);
196 fdirent->node_crc = crc32(0, (uint8_t *)fdirent, sizeof(*fdirent) - 4);
199 vec[0].iov_base = fdirent;
200 vec[0].iov_len = sizeof(*fdirent);
272 chfs_free_flash_dirent(fdirent);