]> err.no Git - util-linux/commitdiff
Revert "libuuid: move clock state file from /var/lib to /var/run"
authorKarel Zak <kzak@redhat.com>
Tue, 30 Jun 2009 08:18:04 +0000 (10:18 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 30 Jun 2009 08:18:04 +0000 (10:18 +0200)
This reverts commit ab2e7dd17f556d501d27c6b0ae2c0989d5d9dae4.

The state file clock.txt should be kept in /var/lib, it should remain
valid after a reboot.

shlibs/uuid/src/gen_uuid.c

index 21034199eac20f0969457eeb05cf8a22c95b616d..8497ac675f75f27a7675103cb802b320a4208ef2 100644 (file)
 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)
 {
@@ -324,7 +322,8 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
 
        if (state_fd == -2) {
                save_umask = umask(0);
-               state_fd = open(UUID_CLOCK_STATE, O_RDWR|O_CREAT, 0660);
+               state_fd = open("/var/lib/libuuid/clock.txt",
+                               O_RDWR|O_CREAT, 0660);
                (void) umask(save_umask);
                state_f = fdopen(state_fd, "r+");
                if (!state_f) {