Lines Matching refs:block_seek
896 off_t block_seek; /* offset inside the current block to the start in flash_read_buf() local
905 block_seek = offset - blockstart; in flash_read_buf()
915 if (readlen > blocklen - block_seek) in flash_read_buf()
916 readlen = blocklen - block_seek; in flash_read_buf()
927 if (blockstart + block_seek + readlen > environment_end(dev)) { in flash_read_buf()
942 lseek(fd, blockstart + block_seek, SEEK_SET); in flash_read_buf()
952 rc, (unsigned long long)blockstart + block_seek, in flash_read_buf()
957 block_seek = 0; in flash_read_buf()
984 off_t block_seek; /* offset inside the erase block to the start in flash_write_buf() local
997 block_seek = 0; in flash_write_buf()
1010 block_seek = DEVOFFSET(dev) - erase_offset; in flash_write_buf()
1017 write_total = ((block_seek + count + blocklen - 1) / in flash_write_buf()
1041 if (block_seek != 0) in flash_write_buf()
1042 fprintf(stderr, "0x%x - 0x%lx", 0, block_seek - 1); in flash_write_buf()
1043 if (block_seek + count != write_total) { in flash_write_buf()
1044 if (block_seek != 0) in flash_write_buf()
1047 (unsigned long)block_seek + count, in flash_write_buf()
1053 memcpy(data + block_seek, buf, count); in flash_write_buf()
1124 block_seek = 0; in flash_write_buf()