From 296cdd194fb36e4b080690f5f24228925722bf57 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 6 Sep 2019 13:03:11 +0000 Subject: Adapt to new stopwatch API --- src/daemontools-extras/s6-log.c | 4 ++-- src/daemontools-extras/s6-setlock.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/daemontools-extras') diff --git a/src/daemontools-extras/s6-log.c b/src/daemontools-extras/s6-log.c index 5477298..8596879 100644 --- a/src/daemontools-extras/s6-log.c +++ b/src/daemontools-extras/s6-log.c @@ -1184,8 +1184,8 @@ int main (int argc, char const *const *argv) if (linelimit && linelimit < LINELIMIT_MIN) linelimit = LINELIMIT_MIN ; if (compat_gflags && verbosity) strerr_warnw1x("options -t and -e are deprecated") ; if (!fd_sanitize()) strerr_diefu1sys(111, "ensure stdin/stdout/stderr are open") ; - tain_now_set_stopwatch() ; /* only for timeouts; wallclock is used for timestamping */ - if (!tain_now_g() && verbosity) strerr_warnwu1sys("read current time - timestamps may be wrong for a while") ; + if (!tain_now_set_stopwatch_g() && verbosity) + strerr_warnwu1sys("set monotonic clock and read current time - timestamps may be wrong for a while") ; if (ndelay_on(0) < 0) strerr_diefu3sys(111, "set std", "in", " non-blocking") ; if (ndelay_on(1) < 0) strerr_diefu3sys(111, "set std", "out", " non-blocking") ; script_firstpass(argv, &sellen, &actlen, &scriptlen, &gflags) ; diff --git a/src/daemontools-extras/s6-setlock.c b/src/daemontools-extras/s6-setlock.c index a07c0e4..83741ac 100644 --- a/src/daemontools-extras/s6-setlock.c +++ b/src/daemontools-extras/s6-setlock.c @@ -57,8 +57,7 @@ int main (int argc, char const *const *argv, char const *const *envp) int p[2] = { 0, 1 } ; pid_t pid ; char c ; - tain_now_set_stopwatch() ; - tain_now_g() ; + tain_now_set_stopwatch_g() ; tain_from_millisecs(&deadline, timeout) ; tain_add_g(&deadline, &deadline) ; pid = child_spawn2(S6_LIBEXECPREFIX "s6lockd-helper", cargv, cenvp, p) ; -- cgit v1.2.3