Lines Matching refs:buffer

43     memset(pcache->buffer, 0xff, lfs->cfg->cache_size);  in lfs_cache_zero()
50 void *buffer, lfs_size_t size) { in lfs_bd_read() argument
51 uint8_t *data = buffer; in lfs_bd_read()
65 memcpy(data, &pcache->buffer[off-pcache->off], diff); in lfs_bd_read()
82 memcpy(data, &rcache->buffer[off-rcache->off], diff); in lfs_bd_read()
120 rcache->off, rcache->buffer, rcache->size); in lfs_bd_read()
133 const void *buffer, lfs_size_t size) { in lfs_bd_cmp() argument
134 const uint8_t *data = buffer; in lfs_bd_cmp()
185 pcache->off, pcache->buffer, diff); in lfs_bd_flush()
196 pcache->block, pcache->off, pcache->buffer, diff); in lfs_bd_flush()
233 const void *buffer, lfs_size_t size) { in lfs_bd_prog() argument
234 const uint8_t *data = buffer; in lfs_bd_prog()
245 memcpy(&pcache->buffer[off-pcache->off], data, diff); in lfs_bd_prog()
381 const void *buffer; member
557 const void *buffer, lfs_size_t size);
559 const void *buffer, lfs_size_t size);
585 void *buffer, lfs_size_t size);
587 void *buffer, lfs_size_t size);
608 lfs->free.buffer[off / 32] |= 1U << (off % 32); in lfs_alloc_lookahead()
639 memset(lfs->free.buffer, 0, lfs->cfg->lookahead_size); in lfs_fs_rawgc()
658 if (!(lfs->free.buffer[off / 32] & (1U << (off % 32)))) { in lfs_alloc()
665 (lfs->free.buffer[lfs->free.i / 32] in lfs_alloc()
754 lfs_tag_t gmask, lfs_tag_t gtag, void *buffer) { in lfs_dir_get() argument
757 0, buffer, lfs_tag_size(gtag)); in lfs_dir_get()
763 lfs_off_t off, void *buffer, lfs_size_t size) { in lfs_dir_getread() argument
764 uint8_t *data = buffer; in lfs_dir_getread()
777 memcpy(data, &pcache->buffer[off-pcache->off], diff); in lfs_dir_getread()
794 memcpy(data, &rcache->buffer[off-rcache->off], diff); in lfs_dir_getread()
812 rcache->off, rcache->buffer, rcache->size); in lfs_dir_getread()
823 lfs_tag_t tag, const void *buffer) { in lfs_dir_traverse_filter() argument
825 (void)buffer; in lfs_dir_traverse_filter()
874 int (*cb)(void *data, lfs_tag_t tag, const void *buffer);
878 const void *buffer; member
887 int (*cb)(void *data, lfs_tag_t tag, const void *buffer), void *data) { in lfs_dir_traverse() argument
896 const void *buffer; in lfs_dir_traverse() local
912 buffer = &disk; in lfs_dir_traverse()
916 buffer = attrs[0].buffer; in lfs_dir_traverse()
949 .buffer = buffer, in lfs_dir_traverse()
1016 dir = buffer; in lfs_dir_traverse()
1028 const struct lfs_attr *a = buffer; in lfs_dir_traverse()
1030 lfs_tag_id(tag) + diff, a[i].size), a[i].buffer); in lfs_dir_traverse()
1040 res = cb(data, tag + LFS_MKTAG(0, diff, 0), buffer); in lfs_dir_traverse()
1067 buffer = stack[sp-1].buffer; in lfs_dir_traverse()
1080 int (*cb)(void *data, lfs_tag_t tag, const void *buffer), void *data) { in lfs_dir_fetchmatch() argument
1423 lfs_tag_t tag, const void *buffer) { in lfs_dir_find_match() argument
1426 const struct lfs_diskoff *disk = buffer; in lfs_dir_find_match()
1559 const void *buffer, lfs_size_t size) { in lfs_dir_commitprog() argument
1563 (const uint8_t*)buffer, size); in lfs_dir_commitprog()
1568 commit->crc = lfs_crc(commit->crc, buffer, size); in lfs_dir_commitprog()
1576 lfs_tag_t tag, const void *buffer) { in lfs_dir_commitattr() argument
1592 err = lfs_dir_commitprog(lfs, commit, buffer, dsize-sizeof(tag)); in lfs_dir_commitattr()
1598 const struct lfs_diskoff *disk = buffer; in lfs_dir_commitattr()
1869 static int lfs_dir_commit_size(void *p, lfs_tag_t tag, const void *buffer) { in lfs_dir_commit_size() argument
1871 (void)buffer; in lfs_dir_commit_size()
1886 static int lfs_dir_commit_commit(void *p, lfs_tag_t tag, const void *buffer) { in lfs_dir_commit_commit() argument
1888 return lfs_dir_commitattr(commit->lfs, commit->commit, tag, buffer); in lfs_dir_commit_commit()
2200 dir->tail[0] = ((lfs_block_t*)attrs[i].buffer)[0]; in lfs_dir_relocatingcommit()
2201 dir->tail[1] = ((lfs_block_t*)attrs[i].buffer)[1]; in lfs_dir_relocatingcommit()
3033 file->cache.buffer = NULL;
3110 file->cfg->attrs[i].buffer);
3131 if (file->cfg->buffer) {
3132 file->cache.buffer = file->cfg->buffer;
3134 file->cache.buffer = lfs_malloc(lfs->cfg->cache_size);
3135 if (!file->cache.buffer) {
3159 file->cache.buffer);
3198 if (!file->cfg->buffer) {
3199 lfs_free(file->cache.buffer);
3258 memcpy(file->cache.buffer, lfs->pcache.buffer, lfs->cfg->cache_size);
3389 const void *buffer; local
3395 buffer = file->cache.buffer;
3403 buffer = &ctz;
3409 {LFS_MKTAG(type, file->id, size), buffer},
3425 void *buffer, lfs_size_t size) { argument
3426 uint8_t *data = buffer;
3486 void *buffer, lfs_size_t size) { argument
3499 return lfs_file_flushedread(lfs, file, buffer, size);
3505 const void *buffer, lfs_size_t size) { argument
3506 const uint8_t *data = buffer;
3593 const void *buffer, lfs_size_t size) { argument
3626 lfs_ssize_t nsize = lfs_file_flushedwrite(lfs, file, buffer, size);
3724 lfs->rcache.buffer, size);
3735 memcpy(file->cache.buffer, lfs->rcache.buffer, size);
4039 uint8_t type, void *buffer, lfs_size_t size) { argument
4059 buffer);
4073 uint8_t type, const void *buffer, lfs_size_t size) { argument
4091 {LFS_MKTAG(LFS_TYPE_USERATTR + type, id, size), buffer}));
4097 uint8_t type, const void *buffer, lfs_size_t size) { argument
4102 return lfs_commitattr(lfs, path, type, buffer, size);
4164 lfs->rcache.buffer = lfs->cfg->read_buffer;
4166 lfs->rcache.buffer = lfs_malloc(lfs->cfg->cache_size);
4167 if (!lfs->rcache.buffer) {
4175 lfs->pcache.buffer = lfs->cfg->prog_buffer;
4177 lfs->pcache.buffer = lfs_malloc(lfs->cfg->cache_size);
4178 if (!lfs->pcache.buffer) {
4193 lfs->free.buffer = lfs->cfg->lookahead_buffer;
4195 lfs->free.buffer = lfs_malloc(lfs->cfg->lookahead_size);
4196 if (!lfs->free.buffer) {
4245 lfs_free(lfs->rcache.buffer);
4249 lfs_free(lfs->pcache.buffer);
4253 lfs_free(lfs->free.buffer);
4273 memset(lfs->free.buffer, 0, lfs->cfg->lookahead_size);
4695 lfs_tag_t tag, const void *buffer) { argument
4698 const struct lfs_diskoff *disk = buffer;
5176 static void lfs1_crc(uint32_t *crc, const void *buffer, size_t size) { argument
5177 *crc = lfs_crc(*crc, buffer, size);
5181 lfs_off_t off, void *buffer, lfs_size_t size) { argument
5185 block, off, buffer, size);
5878 uint8_t type, void *buffer, lfs_size_t size) { argument
5884 (void*)lfs, path, type, buffer, size);
5886 lfs_ssize_t res = lfs_rawgetattr(lfs, path, type, buffer, size);
5895 uint8_t type, const void *buffer, lfs_size_t size) { argument
5901 (void*)lfs, path, type, buffer, size);
5903 err = lfs_rawsetattr(lfs, path, type, buffer, size);
5955 (void*)cfg, cfg->buffer, (void*)cfg->attrs, cfg->attr_count);
5998 void *buffer, lfs_size_t size) { argument
6004 (void*)lfs, (void*)file, buffer, size);
6007 lfs_ssize_t res = lfs_file_rawread(lfs, file, buffer, size);
6016 const void *buffer, lfs_size_t size) { argument
6022 (void*)lfs, (void*)file, buffer, size);
6025 lfs_ssize_t res = lfs_file_rawwrite(lfs, file, buffer, size);