Lines Matching refs:state_fd
315 THREAD_LOCAL int state_fd = -2; in get_clock() local
326 if (state_fd == -2) { in get_clock()
328 state_fd = open("/var/lib/libuuid/clock.txt", in get_clock()
331 if (state_fd >= 0) { in get_clock()
332 state_f = fdopen(state_fd, "r+"); in get_clock()
334 close(state_fd); in get_clock()
335 state_fd = -1; in get_clock()
345 if (state_fd >= 0) { in get_clock()
347 while (fcntl(state_fd, F_SETLKW, &fl) < 0) { in get_clock()
351 state_fd = -1; in get_clock()
356 if (state_fd >= 0) { in get_clock()
407 if (state_fd > 0) { in get_clock()
414 if (ftruncate(state_fd, len) < 0) { in get_clock()
421 if (fcntl(state_fd, F_SETLK, &fl) < 0) { in get_clock()
423 state_fd = -1; in get_clock()