aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs6rc/s6rc_repo_lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6rc/s6rc_repo_lock.c')
-rw-r--r--src/libs6rc/s6rc_repo_lock.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/libs6rc/s6rc_repo_lock.c b/src/libs6rc/s6rc_repo_lock.c
deleted file mode 100644
index 472ff15..0000000
--- a/src/libs6rc/s6rc_repo_lock.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* ISC license. */
-
-#include <string.h>
-
-#include <skalibs/djbunix.h>
-
-#include <s6-rc/repo.h>
-
-int s6rc_repo_lock (char const *repo, int w)
-{
- int fd ;
- size_t repolen = strlen(repo) ;
- char fn[repolen + 13] ;
- memcpy(fn, repo, repolen) ;
- memcpy(fn + repolen, "/lock", 6) ;
- fd = openc_write(fn) ;
- if (fd == -1) return -1 ;
- if (fd_lock(fd, w, 0) < 1) return -1 ;
- return fd ;
-}