]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libuuid: move clock.txt path to header file
authorKarel Zak <kzak@redhat.com>
Mon, 18 Jun 2012 13:36:00 +0000 (15:36 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 18 Jun 2012 13:36:00 +0000 (15:36 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libuuid/src/gen_uuid.c
libuuid/src/uuidP.h

index 613da0207130f460121545791eb4ba9a4294c92d..02e7f497e8360c07d9c8a6005ae78ff052fd8e46 100644 (file)
@@ -235,8 +235,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(LIBUUID_CLOCK_FILE, O_RDWR|O_CREAT, 0660);
                (void) umask(save_umask);
                if (state_fd != -1) {
                        state_f = fdopen(state_fd, "r+");
index 9d30ce2f8fc150bcdf3f2975751778b02a3e4119..86a5e266f00ed28ce433f4c893438189daa43a7d 100644 (file)
@@ -37,6 +37,8 @@
 
 #include "uuid.h"
 
+#define LIBUUID_CLOCK_FILE     "/var/lib/libuuid/clock.txt"
+
 /*
  * Offset between 15-Oct-1582 and 1-Jan-70
  */