From 2270be82ade6f2e63d652602a3842aa1fca3cb7c Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 13 Mar 2017 13:08:49 +0000 Subject: Adapt to skalibs-2.5.0.0 --- src/libs6rc/s6rc_servicedir_block.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/libs6rc/s6rc_servicedir_block.c') diff --git a/src/libs6rc/s6rc_servicedir_block.c b/src/libs6rc/s6rc_servicedir_block.c index 9fb28b1..a7e2b12 100644 --- a/src/libs6rc/s6rc_servicedir_block.c +++ b/src/libs6rc/s6rc_servicedir_block.c @@ -1,25 +1,24 @@ /* ISC license. */ -#include +#include #include #include -#include #include #include #include int s6rc_servicedir_block (char const *dir) { - size_t dirlen = str_len(dir) ; + size_t dirlen = strlen(dir) ; s6_svstatus_t status ; char fn[dirlen + 6] ; if (!s6_svstatus_read(dir, &status)) return -1 ; - byte_copy(fn, dirlen, dir) ; - byte_copy(fn + dirlen, 6, "/down") ; + memcpy(fn, dir, dirlen) ; + memcpy(fn + dirlen, "/down", 6) ; if (!touch(fn)) return -1 ; if (s6_svc_writectl(dir, S6_SUPERVISE_CTLDIR, "O", 1) < 0) { - register int e = errno ; + int e = errno ; unlink(fn) ; errno = e ; return -1 ; -- cgit v1.2.3