* [PATCH] libuuid - check clock value from LIBUUID_CLOCK_FILE
@ 2022-08-02 12:16 Michael Trapp
2022-08-22 10:28 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Michael Trapp @ 2022-08-02 12:16 UTC (permalink / raw)
To: util-linux; +Cc: kzak
The clock value from the LIBUUID_CLOCK_FILE must be checked in
case of an update of libuuid. If clock==CLOCK_SEQ_CONT it must
be set to a new value.
---
libuuid/src/gen_uuid.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c
index 807dcd115..e1ba3c3d0 100644
--- a/libuuid/src/gen_uuid.c
+++ b/libuuid/src/gen_uuid.c
@@ -274,6 +274,11 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low,
last.tv_usec = tv2;
adjustment = a;
}
+ // reset in case of reserved CLOCK_SEQ_CONT
+ if (clock_seq == CLOCK_SEQ_CONT) {
+ last.tv_sec = 0;
+ last.tv_usec = 0;
+ }
}
if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
--
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libuuid - check clock value from LIBUUID_CLOCK_FILE
2022-08-02 12:16 [PATCH] libuuid - check clock value from LIBUUID_CLOCK_FILE Michael Trapp
@ 2022-08-22 10:28 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2022-08-22 10:28 UTC (permalink / raw)
To: Michael Trapp; +Cc: util-linux
On Tue, Aug 02, 2022 at 02:16:43PM +0200, Michael Trapp wrote:
> libuuid/src/gen_uuid.c | 5 +++++
> 1 file changed, 5 insertions(+)
Applied, thanks. (And sorry for the delay :-)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-22 10:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 12:16 [PATCH] libuuid - check clock value from LIBUUID_CLOCK_FILE Michael Trapp
2022-08-22 10:28 ` Karel Zak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.