]> err.no Git - util-linux/commitdiff
libuuid: move clock state file from /var/lib to /var/run
authorKarel Zak <kzak@redhat.com>
Mon, 29 Jun 2009 14:01:42 +0000 (16:01 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 29 Jun 2009 14:01:42 +0000 (16:01 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/uuid/src/gen_uuid.c

index 8497ac675f75f27a7675103cb802b320a4208ef2..21034199eac20f0969457eeb05cf8a22c95b616d 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)
 {
@@ -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) {