summaryrefslogtreecommitdiff
path: root/src/libs6rc/s6rc_servicedir_unblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6rc/s6rc_servicedir_unblock.c')
-rw-r--r--src/libs6rc/s6rc_servicedir_unblock.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libs6rc/s6rc_servicedir_unblock.c b/src/libs6rc/s6rc_servicedir_unblock.c
index 0c2ae23..2a10bfd 100644
--- a/src/libs6rc/s6rc_servicedir_unblock.c
+++ b/src/libs6rc/s6rc_servicedir_unblock.c
@@ -1,9 +1,8 @@
/* ISC license. */
-#include <sys/types.h>
+#include <string.h>
#include <errno.h>
#include <unistd.h>
-#include <skalibs/bytestr.h>
#include <s6/s6-supervise.h>
#include <s6-rc/s6rc-servicedir.h>
@@ -11,10 +10,10 @@ int s6rc_servicedir_unblock (char const *dir, int h)
{
if (h)
{
- size_t dirlen = str_len(dir) ;
+ size_t dirlen = strlen(dir) ;
char fn[dirlen + 6] ;
- byte_copy(fn, dirlen, dir) ;
- byte_copy(fn + dirlen, 6, "/down") ;
+ memcpy(fn, dir, dirlen) ;
+ memcpy(fn + dirlen, "/down", 6) ;
if (unlink(fn) < 0 && errno != ENOENT) return -1 ;
if (s6_svc_writectl(dir, S6_SUPERVISE_CTLDIR, "u", 1) < 0) return -1 ;
}