Home
last modified time | relevance | path

Searched refs:fdirent (Results 1 – 4 of 4) sorted by relevance

/netbsd/usr.sbin/makefs/chfs/
H A Dchfs_mkfs.c192 struct chfs_flash_dirent_node fdirent; in write_dirent() local
198 memset(&fdirent, 0, sizeof(fdirent)); in write_dirent()
201 fdirent.length = htole32(CHFS_PAD(sizeof(fdirent) + strlen(name))); in write_dirent()
202 fdirent.hdr_crc = htole32(crc32(0, (uint8_t *)&fdirent, in write_dirent()
211 fdirent.version = htole64(version++); in write_dirent()
212 fdirent.mctime = 0; in write_dirent()
215 fdirent.name_crc = htole32(crc32(0, (uint8_t *)name, fdirent.nsize)); in write_dirent()
216 fdirent.node_crc = htole32(crc32(0, (uint8_t *)&fdirent, in write_dirent()
217 sizeof(fdirent) - 4)); in write_dirent()
219 pad_block_if_less_than(fsopts, sizeof(fdirent) + fdirent.nsize); in write_dirent()
[all …]
/netbsd/sys/ufs/chfs/
H A Dchfs_write.c175 if (!fdirent) in chfs_write_flash_dirent()
187 fdirent->hdr_crc = htole32(crc32(0, (uint8_t *)fdirent, in chfs_write_flash_dirent()
189 fdirent->vno = htole64(ino); in chfs_write_flash_dirent()
190 fdirent->pvno = htole64(pdir->ino); in chfs_write_flash_dirent()
192 fdirent->mctime = ip?ip->ctime:0; in chfs_write_flash_dirent()
193 fdirent->nsize = fd->nsize; in chfs_write_flash_dirent()
194 fdirent->dtype = fd->type; in chfs_write_flash_dirent()
196 fdirent->node_crc = crc32(0, (uint8_t *)fdirent, sizeof(*fdirent) - 4); in chfs_write_flash_dirent()
199 vec[0].iov_base = fdirent; in chfs_write_flash_dirent()
200 vec[0].iov_len = sizeof(*fdirent); in chfs_write_flash_dirent()
[all …]
H A Dchfs_gc.c705 struct chfs_flash_dirent_node *fdirent; in chfs_gcollect_pristine() local
759 fdirent = (struct chfs_flash_dirent_node *)data; in chfs_gcollect_pristine()
760 crc = crc32(0, (uint8_t *)fdirent, sizeof(struct chfs_flash_dirent_node) - 4); in chfs_gcollect_pristine()
761 if (crc != le32toh(fdirent->node_crc)) { in chfs_gcollect_pristine()
766 crc = crc32(0, fdirent->name, fdirent->nsize); in chfs_gcollect_pristine()
767 if (crc != le32toh(fdirent->name_crc)) { in chfs_gcollect_pristine()
/netbsd/sys/fs/tmpfs/
H A Dtmpfs_rename.c85 struct tmpfs_dirent *fdirent, *tdirent; in tmpfs_sane_rename() local
88 fdvp, fcnp, &fdirent, tdvp, tcnp, &tdirent, in tmpfs_sane_rename()