From c60ebd422171808ad58b936914055397bb205bef Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 12 Mar 2017 11:59:43 +0000 Subject: Adapt to skalibs-2.5.0.0 --- src/supervision/s6-svstat.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/supervision/s6-svstat.c') diff --git a/src/supervision/s6-svstat.c b/src/supervision/s6-svstat.c index 2a0f1aa..2b4da7a 100644 --- a/src/supervision/s6-svstat.c +++ b/src/supervision/s6-svstat.c @@ -1,12 +1,11 @@ /* ISC license. */ -#include #include +#include #include #include #include -#include -#include +#include #include #include #include @@ -23,13 +22,13 @@ int main (int argc, char const *const *argv) s6_svstatus_t status ; int flagnum = 0 ; int isup, normallyup ; - char fmt[UINT_FMT] ; + char fmt[UINT64_FMT] ; PROG = "s6-svstat" ; { subgetopt_t l = SUBGETOPT_ZERO ; for (;;) { - register int opt = subgetopt_r(argc, argv, "n", &l) ; + int opt = subgetopt_r(argc, argv, "n", &l) ; if (opt == -1) break ; switch (opt) { @@ -51,10 +50,10 @@ int main (int argc, char const *const *argv) if (tain_future(&status.stamp)) tain_copynow(&status.stamp) ; { - size_t dirlen = str_len(*argv) ; + size_t dirlen = strlen(*argv) ; char fn[dirlen + 6] ; - byte_copy(fn, dirlen, *argv) ; - byte_copy(fn + dirlen, 6, "/down") ; + memcpy(fn, *argv, dirlen) ; + memcpy(fn + dirlen, "/down", 6) ; if (access(fn, F_OK) < 0) if (errno != ENOENT) strerr_diefu2sys(111, "access ", fn) ; else normallyup = 1 ; @@ -65,7 +64,7 @@ int main (int argc, char const *const *argv) if (isup) { buffer_putnoflush(buffer_1small,"up (pid ", 8) ; - buffer_putnoflush(buffer_1small, fmt, uint_fmt(fmt, status.pid)) ; + buffer_putnoflush(buffer_1small, fmt, pid_fmt(fmt, status.pid)) ; buffer_putnoflush(buffer_1small, ") ", 2) ; } else -- cgit v1.2.3