Lines Matching refs:buf
129 nandfs_crc32(uint32_t crc, const uint8_t *buf, size_t len)
141 crc ^= buf[i];
455 void *buf;
464 error = nandfs_buf_read(fs, &buf, &buf_size);
472 bcopy(buf, addr, csize);
541 void *buf;
552 if (nandfs_buf_read(fs, &buf, &buf_size)) {
561 dirent = (struct nandfs_dir_entry *)buf;
769 nandfs_daddr_t blknr, u_int nblks, void *buf, int raw)
795 if (ioread(fs->nf_file, pblks[i] * fs->nf_blocksize, buf,
802 buf = (void *)((uintptr_t)buf + fs->nf_blocksize);
811 nandfs_read_blk(struct nandfs *fs, nandfs_daddr_t blknr, void *buf, int phys)
817 return (ioread(fs->nf_file, pblknr * fs->nf_blocksize, buf,
827 uint8_t *buf;
831 buf = malloc(fs->nf_blocksize);
839 if (nandfs_read_inode(fs, &fs->nf_cpfile, blocknr, 1, buf, 0)) {
840 free(buf);
844 memcpy(cp, buf + blockoff, sizeof(struct nandfs_checkpoint));
845 free(buf);
1011 ioread(struct open_file *f, off_t pos, void *buf, u_int length)
1030 memcpy(buf, (void *)((uintptr_t)buffer + off), length);