Lines Matching defs:file
715 FILE *file = fopen(image_path, "rb+");
716 if (!file)
719 fseek(file, offset, SEEK_SET);
720 if (offset != ftell(file)) {
724 if (!fwrite(data, blocks * BLOCK_SIZE, 1, file)) {
730 if (file)
731 fclose(file);
738 FILE *file = fopen(image_path, "rb");
739 if (!file)
742 fseek(file, offset, SEEK_SET);
743 if (offset != ftell(file)) {
746 if (!fread(data, blocks * BLOCK_SIZE, 1, file)) {
751 if (file)
752 fclose(file);
813 FILE *file = fopen(path, "wb");
814 if (!file)
816 fwrite(data, len, 1, file);
817 fclose(file);
1130 /**********************append file************************/
1219 LOGE("No file to pack!");
1260 static bool dump_file(FILE *file, const char *unpack_dir,
1273 pos = ftell(file);
1282 fseek(file, offset, SEEK_SET);
1283 if (offset != ftell(file)) {
1292 if (!fread(buf, n, 1, file)) {
1308 fseek(file, pos, SEEK_SET);
1412 LOGD("try to write file(%s) to offset:%d...", src_path, offset_block);