Lines Matching defs:fp
390 FILE *fp;
396 fp = fopen(RDM_MONOFILE, "r+");
397 if (fp == NULL) {
400 fp = fopen(RDM_MONOFILE, "w");
401 if (fp == NULL)
404 flocked = flock(fileno(fp), LOCK_EX);
409 flocked = flock(fileno(fp), LOCK_EX);
411 if (fscanf(fp, "0x%016" PRIu64, &rdm) != 1)
416 if (fseek(fp, 0, SEEK_SET) == -1 ||
417 ftruncate(fileno(fp), 0) == -1 ||
418 fprintf(fp, "0x%016" PRIu64 "\n", rdm) != 19)
427 fflush(fp);
430 flock(fileno(fp), LOCK_UN);
432 fclose(fp);