From 949b61c2b23571345ff018f04eabd7bc28650db3 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 18 Jun 2012 15:36:00 +0200 Subject: libuuid: move clock.txt path to header file Signed-off-by: Karel Zak --- libuuid/src/gen_uuid.c | 3 +-- libuuid/src/uuidP.h | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'libuuid') diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c index 613da0207..02e7f497e 100644 --- a/libuuid/src/gen_uuid.c +++ b/libuuid/src/gen_uuid.c @@ -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+"); diff --git a/libuuid/src/uuidP.h b/libuuid/src/uuidP.h index 9d30ce2f8..86a5e266f 100644 --- a/libuuid/src/uuidP.h +++ b/libuuid/src/uuidP.h @@ -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 */ -- cgit v1.2.3-55-g7522