Lines Matching defs:offset_block
712 static bool StorageWriteLba(int offset_block, void *data, int blocks)
718 int offset = offset_block * BLOCK_SIZE;
735 static bool StorageReadLba(int offset_block, void *data, int blocks)
741 int offset = offset_block * BLOCK_SIZE;
756 static bool write_data(int offset_block, void *data, size_t len)
762 if (blocks && !StorageWriteLba(offset_block, data, blocks)) {
769 if (!StorageWriteLba(offset_block + blocks, buf, 1))
778 static int load_file(const char *file_path, int offset_block, int blocks);
787 int offset_block = 0;
794 offset_block = atoi(argv[0]);
800 return load_file(file_path, offset_block, blocks);
838 static bool load_content_data(resource_content *content, int offset_block,
841 if (!StorageReadLba(get_ptn_offset() + content->content_offset + offset_block,
923 static int load_file(const char *file_path, int offset_block, int blocks)
927 printf(", offset block:%d, blocks:%d\n", offset_block, blocks);
946 if (!load_content_data(&content, offset_block, data, blocks)) {
1409 static int write_file(int offset_block, const char *src_path,
1412 LOGD("try to write file(%s) to offset:%d...", src_path, offset_block);
1435 if (!write_data(offset_block, buf, file_size))