Home | History | Annotate | Download | only in chfs

Lines Matching defs:fdirent

192 	struct chfs_flash_dirent_node fdirent;
198 memset(&fdirent, 0, sizeof(fdirent));
199 fdirent.magic = htole16(CHFS_FS_MAGIC_BITMASK);
200 fdirent.type = htole16(CHFS_NODETYPE_DIRENT);
201 fdirent.length = htole32(CHFS_PAD(sizeof(fdirent) + strlen(name)));
202 fdirent.hdr_crc = htole32(crc32(0, (uint8_t *)&fdirent,
204 fdirent.vno = htole64(node->inode->ino);
206 fdirent.pvno = htole64(node->parent->inode->ino);
208 fdirent.pvno = htole64(node->inode->ino);
211 fdirent.version = htole64(version++);
212 fdirent.mctime = 0;
213 fdirent.nsize = htole32(strlen(name));
214 fdirent.dtype = htole32(IFTOCHT(node->type & S_IFMT));
215 fdirent.name_crc = htole32(crc32(0, (uint8_t *)name, fdirent.nsize));
216 fdirent.node_crc = htole32(crc32(0, (uint8_t *)&fdirent,
217 sizeof(fdirent) - 4));
219 pad_block_if_less_than(fsopts, sizeof(fdirent) + fdirent.nsize);
220 buf_write(fsopts, &fdirent, sizeof(fdirent));
221 buf_write(fsopts, name, fdirent.nsize);