Lines Matching refs:filename
65 PR_fprintf(output, ">bigfile [-G] [-d] [-v[*v]] [-s <n>] <filename>\n");
70 PR_fprintf(output, "\t<filename>\tName of test file\t(none)\n");
74 static PRStatus DeleteIfFound(const char *filename)
78 rv = PR_Access(filename, PR_ACCESS_WRITE_OK);
82 rv = PR_Delete(filename);
91 static PRIntn Error(const char *msg, const char *filename)
99 (void)DeleteIfFound(filename);
111 static void PrintInfo(PRFileInfo64 *info, const char *filename)
118 __FILE__, __LINE__, filename);
142 const char *filename = NULL;
158 filename = opt->value;
184 if (NULL == filename)
187 else filename = "bigfile.dat";
190 if (PR_FAILURE == DeleteIfFound(filename)) return 1;
204 file = PR_Open(filename, PR_CREATE_FILE | PR_WRONLY, 0666);
205 if (NULL == file) return Error("PR_Open()", filename);
209 if (!LL_IS_ZERO(big_answer)) return Error("empty available64()", filename);
214 if (!LL_EQ(big_answer, big_size)) return Error("seek", filename);
218 if (bytes != BUFFER_SIZE) return Error("write", filename);
222 if (!LL_IS_ZERO(big_answer)) return Error("eof available64()", filename);
226 if (PR_FAILURE == rv) return Error("fileInfo64()", filename);
227 if (v_shout <= verbose) PrintInfo(&big_info, filename);
234 return Error("fileInfo()", filename);
239 return Error("fileInfo()", filename);
244 if (!LL_IS_ZERO(big_answer)) return Error("rewind seek64()", filename);
249 return Error("bof available64()", filename);
253 if (PR_FAILURE == rv) return Error("close()", filename);
256 file = PR_Open(filename, PR_RDWR, 0666);
257 if (NULL == file) return Error("open failed", filename);
262 return Error("reopened available64()", filename);
270 return Error("write", filename);
277 return Error("file size error", filename);
282 return Error("eof available64()", filename);
286 if (!LL_IS_ZERO(big_answer)) return Error("bof seek64()", filename);
290 if (LL_NE(big_answer, filesize64)) return Error("bof available64()", filename);
294 if (LL_NE(big_answer, filesize64)) return Error("eof seek64()", filename);
298 if (PR_FAILURE == rv) return Error("fileInfo64()", filename);
299 if (v_shout <= verbose) PrintInfo(&big_info, filename);
303 if (PR_FAILURE == rv) return Error("close()", filename);
306 rv = PR_GetFileInfo64(filename, &big_info);
307 if (PR_FAILURE == rv) return Error("fileInfo64()", filename);
308 if (v_shout <= verbose) PrintInfo(&big_info, filename);
311 rv = PR_Delete(filename);
312 if (PR_FAILURE == rv) return Error("PR_Delete()", filename);