Lines Matching refs:file
104 FILE* file;
117 file = fopen(micro_path, "r");
118 if (file == NULL) {
119 PRINT(("Cannot open microcode file\n"));
125 if (fread(microc_headp, sizeof(struct rt200_microc_head), 1, file) != 1)
127 PRINT(("Cannot read header from file: %s\n", micro_path));
147 ret = fread(&curr_seg->num_bytes, 4, 1, file);
148 ret += fread(&curr_seg->download_dst, 4, 1, file);
149 ret += fread(&curr_seg->crc_val, 4, 1, file);
152 PRINT(("Cannot read segment from microcode file: %s\n", micro_path));
182 if ( fread(curr_seg->data, curr_seg->num_bytes, 1, file) != 1 )
196 if ((fgets(tmp1, 12, file) != NULL) &&
197 (fgets(tmp2, 12, file) != NULL) &&
198 (fgets(tmp3, 12, file) != NULL) &&
199 fgets(tmp4, 12, file) != NULL)
208 PRINT(("Cannot read header from file: %s\n", micro_path));
226 if (fgets(tmp1, 12, file) != NULL &&
227 fgets(tmp2, 12, file) != NULL &&
228 fgets(tmp3, 12, file) != NULL)
236 PRINT(("Cannot read segment from microcode file: %s\n", micro_path));
268 if ( fgets(tmp1, 12, file) == NULL )
270 PRINT(("Cannot read from file\n"));
289 fclose(file);
301 fclose(file);