libuuid: move clock state file from /var/lib to /var/run

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2009-06-29 16:01:42 +02:00
parent a0fca6a752
commit ab2e7dd17f
1 changed files with 3 additions and 2 deletions

View File

@ -109,6 +109,8 @@
THREAD_LOCAL unsigned short jrand_seed[3];
#endif
#define UUID_CLOCK_STATE "/var/run/libuuid/clock"
#ifdef _WIN32
static void gettimeofday (struct timeval *tv, void *dummy)
{
@ -322,8 +324,7 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
if (state_fd == -2) {
save_umask = umask(0);
state_fd = open("/var/lib/libuuid/clock.txt",
O_RDWR|O_CREAT, 0660);
state_fd = open(UUID_CLOCK_STATE, O_RDWR|O_CREAT, 0660);
(void) umask(save_umask);
state_f = fdopen(state_fd, "r+");
if (!state_f) {