summaryrefslogtreecommitdiff
path: root/src/libs6
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-08-30 19:11:44 +0000
committerLaurent Bercot <ska@appnovation.com>2021-08-30 19:11:44 +0000
commit691c69e626e4ceb85567a5288348bd04378fd410 (patch)
tree9ae1c3f2c2984aafa2b9caf7987fe0011fcf6828 /src/libs6
parent1719a60278cf36558b568349c0c9f9b5eb91c999 (diff)
downloads6-691c69e626e4ceb85567a5288348bd04378fd410.tar.xz
s6-svlink, s6-svunlink, .h changes
Renamed from s6-svdir-(un)link. Doc added. Full functionality added. Still need to be tested. Unrelated: .h names simplified. Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libs6')
-rw-r--r--src/libs6/deps-lib/s61
-rw-r--r--src/libs6/s6_dtally_pack.c2
-rw-r--r--src/libs6/s6_dtally_read.c2
-rw-r--r--src/libs6/s6_dtally_unpack.c2
-rw-r--r--src/libs6/s6_dtally_write.c2
-rw-r--r--src/libs6/s6_fdholder_delete.c2
-rw-r--r--src/libs6/s6_fdholder_delete_async.c2
-rw-r--r--src/libs6/s6_fdholder_end.c2
-rw-r--r--src/libs6/s6_fdholder_getdump.c2
-rw-r--r--src/libs6/s6_fdholder_list.c2
-rw-r--r--src/libs6/s6_fdholder_list_async.c2
-rw-r--r--src/libs6/s6_fdholder_list_cb.c2
-rw-r--r--src/libs6/s6_fdholder_retrieve.c2
-rw-r--r--src/libs6/s6_fdholder_retrieve_async.c2
-rw-r--r--src/libs6/s6_fdholder_retrieve_cb.c2
-rw-r--r--src/libs6/s6_fdholder_setdump.c2
-rw-r--r--src/libs6/s6_fdholder_start.c2
-rw-r--r--src/libs6/s6_fdholder_store.c2
-rw-r--r--src/libs6/s6_fdholder_store_async.c2
-rw-r--r--src/libs6/s6_supervise_link.c2
-rw-r--r--src/libs6/s6_supervise_link_names.c22
-rw-r--r--src/libs6/s6_supervise_unlink.c2
-rw-r--r--src/libs6/s6_supervise_unlink_names.c98
-rw-r--r--src/libs6/s6_svc_ok.c2
-rw-r--r--src/libs6/s6_svc_write.c2
-rw-r--r--src/libs6/s6_svc_writectl.c2
-rw-r--r--src/libs6/s6_svstatus_pack.c8
-rw-r--r--src/libs6/s6_svstatus_read.c2
-rw-r--r--src/libs6/s6_svstatus_unpack.c8
-rw-r--r--src/libs6/s6_svstatus_write.c2
-rw-r--r--src/libs6/s6lock_acquire.c2
-rw-r--r--src/libs6/s6lock_check.c2
-rw-r--r--src/libs6/s6lock_end.c2
-rw-r--r--src/libs6/s6lock_release.c2
-rw-r--r--src/libs6/s6lock_start.c2
-rw-r--r--src/libs6/s6lock_startf.c2
-rw-r--r--src/libs6/s6lock_update.c2
-rw-r--r--src/libs6/s6lock_wait_and.c2
-rw-r--r--src/libs6/s6lock_wait_or.c2
-rw-r--r--src/libs6/s6lock_zero.c2
-rw-r--r--src/libs6/s6lockd.c2
41 files changed, 161 insertions, 48 deletions
diff --git a/src/libs6/deps-lib/s6 b/src/libs6/deps-lib/s6
index 94eab87..17b6dc4 100644
--- a/src/libs6/deps-lib/s6
+++ b/src/libs6/deps-lib/s6
@@ -65,4 +65,5 @@ s6_fdholder_store_async.o
s6_supervise_link.o
s6_supervise_link_names.o
s6_supervise_unlink.o
+s6_supervise_unlink_names.o
-lskarnet
diff --git a/src/libs6/s6_dtally_pack.c b/src/libs6/s6_dtally_pack.c
index 1608e78..47c26f4 100644
--- a/src/libs6/s6_dtally_pack.c
+++ b/src/libs6/s6_dtally_pack.c
@@ -1,7 +1,7 @@
/* ISC license. */
#include <skalibs/tai.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
void s6_dtally_pack (char *pack, s6_dtally_t const *d)
{
diff --git a/src/libs6/s6_dtally_read.c b/src/libs6/s6_dtally_read.c
index 3906b93..a1623cc 100644
--- a/src/libs6/s6_dtally_read.c
+++ b/src/libs6/s6_dtally_read.c
@@ -7,7 +7,7 @@
#include <skalibs/allreadwrite.h>
#include <skalibs/tai.h>
#include <skalibs/djbunix.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
static int truncit (char const *s)
{
diff --git a/src/libs6/s6_dtally_unpack.c b/src/libs6/s6_dtally_unpack.c
index 8fca787..a82e5c3 100644
--- a/src/libs6/s6_dtally_unpack.c
+++ b/src/libs6/s6_dtally_unpack.c
@@ -1,7 +1,7 @@
/* ISC license. */
#include <skalibs/tai.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
void s6_dtally_unpack (char const *pack, s6_dtally_t *d)
{
diff --git a/src/libs6/s6_dtally_write.c b/src/libs6/s6_dtally_write.c
index 785376a..766b66c 100644
--- a/src/libs6/s6_dtally_write.c
+++ b/src/libs6/s6_dtally_write.c
@@ -2,7 +2,7 @@
#include <string.h>
#include <skalibs/djbunix.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
int s6_dtally_write (char const *sv, s6_dtally_t const *tab, size_t n)
{
diff --git a/src/libs6/s6_fdholder_delete.c b/src/libs6/s6_fdholder_delete.c
index 6f506dd..585722d 100644
--- a/src/libs6/s6_fdholder_delete.c
+++ b/src/libs6/s6_fdholder_delete.c
@@ -6,7 +6,7 @@
#include <skalibs/tai.h>
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
#include <skalibs/posixishard.h>
diff --git a/src/libs6/s6_fdholder_delete_async.c b/src/libs6/s6_fdholder_delete_async.c
index 2b14f47..50dc6f8 100644
--- a/src/libs6/s6_fdholder_delete_async.c
+++ b/src/libs6/s6_fdholder_delete_async.c
@@ -4,7 +4,7 @@
#include <string.h>
#include <errno.h>
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
int s6_fdholder_delete_async (s6_fdholder_t *a, char const *id)
{
diff --git a/src/libs6/s6_fdholder_end.c b/src/libs6/s6_fdholder_end.c
index 7b2cb2d..dd8c312 100644
--- a/src/libs6/s6_fdholder_end.c
+++ b/src/libs6/s6_fdholder_end.c
@@ -2,7 +2,7 @@
#include <skalibs/djbunix.h>
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
void s6_fdholder_end (s6_fdholder_t *a)
{
diff --git a/src/libs6/s6_fdholder_getdump.c b/src/libs6/s6_fdholder_getdump.c
index 630ddc5..b24ed02 100644
--- a/src/libs6/s6_fdholder_getdump.c
+++ b/src/libs6/s6_fdholder_getdump.c
@@ -11,7 +11,7 @@
#include <skalibs/djbunix.h>
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
#include <skalibs/posixishard.h>
diff --git a/src/libs6/s6_fdholder_list.c b/src/libs6/s6_fdholder_list.c
index 312fc28..10d1f2c 100644
--- a/src/libs6/s6_fdholder_list.c
+++ b/src/libs6/s6_fdholder_list.c
@@ -5,7 +5,7 @@
#include <skalibs/error.h>
#include <skalibs/tai.h>
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
int s6_fdholder_list (s6_fdholder_t *a, stralloc *sa, tain const *deadline, tain *stamp)
{
diff --git a/src/libs6/s6_fdholder_list_async.c b/src/libs6/s6_fdholder_list_async.c
index e7e8810..167a6f9 100644
--- a/src/libs6/s6_fdholder_list_async.c
+++ b/src/libs6/s6_fdholder_list_async.c
@@ -1,7 +1,7 @@
/* ISC license. */
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
int s6_fdholder_list_async (s6_fdholder_t *a)
{
diff --git a/src/libs6/s6_fdholder_list_cb.c b/src/libs6/s6_fdholder_list_cb.c
index 0be71c9..f1b8895 100644
--- a/src/libs6/s6_fdholder_list_cb.c
+++ b/src/libs6/s6_fdholder_list_cb.c
@@ -7,7 +7,7 @@
#include <skalibs/bytestr.h>
#include <skalibs/stralloc.h>
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
#include <skalibs/posixishard.h>
diff --git a/src/libs6/s6_fdholder_retrieve.c b/src/libs6/s6_fdholder_retrieve.c
index 7af8eb4..6f56283 100644
--- a/src/libs6/s6_fdholder_retrieve.c
+++ b/src/libs6/s6_fdholder_retrieve.c
@@ -4,7 +4,7 @@
#include <skalibs/allreadwrite.h>
#include <skalibs/tai.h>
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
int s6_fdholder_retrieve_maybe_delete (s6_fdholder_t *a, char const *id, int dodelete, tain const *deadline, tain *stamp)
{
diff --git a/src/libs6/s6_fdholder_retrieve_async.c b/src/libs6/s6_fdholder_retrieve_async.c
index ce190b8..da41aad 100644
--- a/src/libs6/s6_fdholder_retrieve_async.c
+++ b/src/libs6/s6_fdholder_retrieve_async.c
@@ -4,7 +4,7 @@
#include <string.h>
#include <errno.h>
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
int s6_fdholder_retrieve_maybe_delete_async (s6_fdholder_t *a, char const *id, int dodelete)
{
diff --git a/src/libs6/s6_fdholder_retrieve_cb.c b/src/libs6/s6_fdholder_retrieve_cb.c
index e8ad7ee..39eca50 100644
--- a/src/libs6/s6_fdholder_retrieve_cb.c
+++ b/src/libs6/s6_fdholder_retrieve_cb.c
@@ -4,7 +4,7 @@
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
#include <skalibs/posixishard.h>
diff --git a/src/libs6/s6_fdholder_setdump.c b/src/libs6/s6_fdholder_setdump.c
index 8c5ae6e..9c88f6b 100644
--- a/src/libs6/s6_fdholder_setdump.c
+++ b/src/libs6/s6_fdholder_setdump.c
@@ -12,7 +12,7 @@
#include <skalibs/tai.h>
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
#include <skalibs/posixishard.h>
diff --git a/src/libs6/s6_fdholder_start.c b/src/libs6/s6_fdholder_start.c
index 7e3ddda..db1046a 100644
--- a/src/libs6/s6_fdholder_start.c
+++ b/src/libs6/s6_fdholder_start.c
@@ -3,7 +3,7 @@
#include <skalibs/djbunix.h>
#include <skalibs/socket.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
int s6_fdholder_start (s6_fdholder_t *a, char const *path, tain const *deadline, tain *stamp)
{
diff --git a/src/libs6/s6_fdholder_store.c b/src/libs6/s6_fdholder_store.c
index 1541905..d765df4 100644
--- a/src/libs6/s6_fdholder_store.c
+++ b/src/libs6/s6_fdholder_store.c
@@ -6,7 +6,7 @@
#include <skalibs/tai.h>
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
#include <skalibs/posixishard.h>
diff --git a/src/libs6/s6_fdholder_store_async.c b/src/libs6/s6_fdholder_store_async.c
index 541f41c..d8577ae 100644
--- a/src/libs6/s6_fdholder_store_async.c
+++ b/src/libs6/s6_fdholder_store_async.c
@@ -5,7 +5,7 @@
#include <errno.h>
#include <skalibs/tai.h>
#include <skalibs/unixmessage.h>
-#include <s6/s6-fdholder.h>
+#include <s6/fdholder.h>
int s6_fdholder_store_async (s6_fdholder_t *a, int fd, char const *id, tain const *limit)
{
diff --git a/src/libs6/s6_supervise_link.c b/src/libs6/s6_supervise_link.c
index 0c6852c..85534be 100644
--- a/src/libs6/s6_supervise_link.c
+++ b/src/libs6/s6_supervise_link.c
@@ -5,7 +5,7 @@
#include <skalibs/stralloc.h>
#include <skalibs/djbunix.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
int s6_supervise_link (char const *scdir, char const *const *servicedirs, size_t n, char const *prefix, uint32_t options, tain const *deadline, tain *stamp)
{
diff --git a/src/libs6/s6_supervise_link_names.c b/src/libs6/s6_supervise_link_names.c
index 74392b9..71fff1d 100644
--- a/src/libs6/s6_supervise_link_names.c
+++ b/src/libs6/s6_supervise_link_names.c
@@ -6,6 +6,7 @@
#include <errno.h>
#include <sys/stat.h>
+#include <skalibs/posixplz.h>
#include <skalibs/bitarray.h>
#include <skalibs/tai.h>
#include <skalibs/stralloc.h>
@@ -13,7 +14,7 @@
#include <s6/ftrigr.h>
#include <s6/ftrigw.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
static inline void do_unlink (char const *scdir, char const *const *names, size_t n, uint32_t killopts)
{
@@ -36,6 +37,13 @@ static uint16_t registerit (ftrigr_t *a, char *fn, size_t len, gid_t gid, uint32
return ftrigr_subscribe(a, fn, "s", 0, deadline, stamp) ;
}
+/*
+ options: bit 0: force event/ mode
+ bit 1: make event/ public
+ bit 2: don't start the service
+ bit 3: remove down files after starting supervisors
+*/
+
int s6_supervise_link_names (char const *scdir, char const *const *servicedirs, char const *const *names, size_t n, uint32_t options, tain const *deadline, tain *stamp)
{
size_t maxnlen = 0, maxlen = 0 ;
@@ -86,7 +94,7 @@ int s6_supervise_link_names (char const *scdir, char const *const *servicedirs,
uint32_t killopts = 0 ;
int r ;
uint16_t ids[ntotal] ;
- char lname[scdirlen + maxnlen + 2] ;
+ char lname[scdirlen + maxnlen + 7] ;
char fn[maxlen + 5 + (sizeof(S6_SUPERVISE_EVENTDIR) > 5 ? sizeof(S6_SUPERVISE_EVENTDIR) : 5)] ;
if (!ftrigr_startf(&a, deadline, stamp)) return -1 ;
memcpy(lname, scdir, scdirlen) ;
@@ -124,6 +132,16 @@ int s6_supervise_link_names (char const *scdir, char const *const *servicedirs,
killopts = 3 ;
if (ftrigr_wait_and(&a, ids, m, deadline, stamp) < 0) goto errsa ;
ftrigr_end(&a) ;
+ if (options & 8)
+ {
+ for (size_t i = 0 ; i < n ; i++)
+ {
+ size_t nlen = strlen(names[i]) ;
+ memcpy(lname + scdirlen + 1, names[i], nlen) ;
+ memcpy(lname + scdirlen + 1 + nlen, "/down", 6) ;
+ unlink_void(lname) ;
+ }
+ }
return m ;
err:
diff --git a/src/libs6/s6_supervise_unlink.c b/src/libs6/s6_supervise_unlink.c
index cc263e4..f981a74 100644
--- a/src/libs6/s6_supervise_unlink.c
+++ b/src/libs6/s6_supervise_unlink.c
@@ -9,7 +9,7 @@
#include <skalibs/allreadwrite.h>
#include <skalibs/djbunix.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
void s6_supervise_unlink (char const *scdir, char const *name, uint32_t options)
{
diff --git a/src/libs6/s6_supervise_unlink_names.c b/src/libs6/s6_supervise_unlink_names.c
new file mode 100644
index 0000000..a0b424d
--- /dev/null
+++ b/src/libs6/s6_supervise_unlink_names.c
@@ -0,0 +1,98 @@
+/* ISC license. */
+
+#include <stdint.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/stat.h>
+
+#include <skalibs/posixplz.h>
+#include <skalibs/bitarray.h>
+
+#include <s6/ftrigr.h>
+#include <s6/supervise.h>
+
+static uint16_t registerit (ftrigr_t *a, char *fn, size_t len, tain const *deadline, tain *stamp)
+{
+ memcpy(fn + len, "/" S6_SUPERVISE_EVENTDIR, sizeof(S6_SUPERVISE_EVENTDIR) + 1) ;
+ return ftrigr_subscribe(a, fn, "x", 0, deadline, stamp) ;
+}
+
+/*
+ options: bit 0: wait for s6-supervise to exit
+*/
+
+int s6_supervise_unlink_names (char const *scdir, char const *const *names, size_t n, uint32_t options, tain const *deadline, tain *stamp)
+{
+ size_t scdirlen = strlen(scdir) ;
+ size_t ntotal = n ;
+ unsigned char locked[bitarray_div8(n)] ;
+ unsigned char logged[bitarray_div8(n)] ;
+ if (!n) return 0 ;
+ memset(locked, 0, bitarray_div8(n)) ;
+ memset(logged, 0, bitarray_div8(n)) ;
+
+ if (options & 1) for (size_t i = 0 ; i < n ; i++)
+ {
+ struct stat st ;
+ size_t nlen = strlen(names[i]) ;
+ int h ;
+ char fn[scdirlen + nlen + 6] ;
+ memcpy(fn, scdir, scdirlen) ;
+ fn[scdirlen] = '/' ;
+ memcpy(fn + scdirlen + 1, names[i], nlen + 1) ;
+ h = s6_svc_ok(fn) ;
+ if (h < 0) return -1 ;
+ if (h) bitarray_set(locked, i) ;
+ memcpy(fn + scdirlen + 1 + nlen, "/log", 5) ;
+ if (stat(fn, &st) < 0)
+ {
+ if (errno != ENOENT) return -1 ;
+ }
+ else
+ {
+ int r ;
+ if (!S_ISDIR(st.st_mode)) return (errno = ENOTDIR, -1) ;
+ r = s6_svc_ok(fn) ;
+ if (r < 0) return -1 ;
+ if (r != h) return (errno = EINVAL, -1) ;
+ bitarray_set(logged, i) ;
+ ntotal++ ;
+ }
+ }
+
+ {
+ ftrigr_t a = FTRIGR_ZERO ;
+ unsigned int m = 0 ;
+ uint16_t ids[ntotal] ;
+ if (options & 1 && !ftrigr_startf(&a, deadline, stamp)) return -1 ;
+ for (size_t i = 0 ; i < n ; i++)
+ {
+ size_t nlen = strlen(names[i]) ;
+ char fn[scdirlen + nlen + 6 + sizeof(S6_SUPERVISE_EVENTDIR)] ;
+ memcpy(fn, scdir, scdirlen) ;
+ fn[scdirlen] = '/' ;
+ memcpy(fn + scdirlen + 1, names[i], nlen) ;
+ if (options & 1 && bitarray_peek(locked, i))
+ {
+ ids[m] = registerit(&a, fn, scdirlen + 1 + nlen, deadline, stamp) ;
+ if (ids[m]) m++ ;
+ if (bitarray_peek(logged, i))
+ {
+ memcpy(fn + scdirlen + 1 + nlen, "/log", 4) ;
+ ids[m] = registerit(&a, fn, scdirlen + 5 + nlen, deadline, stamp) ;
+ if (ids[m]) m++ ;
+ }
+ }
+ fn[scdirlen + 1 + nlen] = 0 ;
+ unlink_void(fn) ;
+ }
+ s6_svc_writectl(scdir, S6_SVSCAN_CTLDIR, "an", 2) ;
+ if (options & 1)
+ {
+ ftrigr_wait_and(&a, ids, m, deadline, stamp) ;
+ ftrigr_end(&a) ;
+ }
+ return m ;
+ }
+}
diff --git a/src/libs6/s6_svc_ok.c b/src/libs6/s6_svc_ok.c
index 4940071..abdc85c 100644
--- a/src/libs6/s6_svc_ok.c
+++ b/src/libs6/s6_svc_ok.c
@@ -5,7 +5,7 @@
#include <skalibs/djbunix.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
int s6_svc_ok (char const *dir)
{
diff --git a/src/libs6/s6_svc_write.c b/src/libs6/s6_svc_write.c
index fba8021..f2a07af 100644
--- a/src/libs6/s6_svc_write.c
+++ b/src/libs6/s6_svc_write.c
@@ -3,7 +3,7 @@
#include <errno.h>
#include <skalibs/allreadwrite.h>
#include <skalibs/djbunix.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
int s6_svc_write (char const *fifo, char const *data, size_t datalen)
{
diff --git a/src/libs6/s6_svc_writectl.c b/src/libs6/s6_svc_writectl.c
index 11eaf0e..dee9128 100644
--- a/src/libs6/s6_svc_writectl.c
+++ b/src/libs6/s6_svc_writectl.c
@@ -7,7 +7,7 @@
#include <string.h>
#include <skalibs/djbunix.h>
#include <skalibs/unix-transactional.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
int s6_svc_writectl (char const *service, char const *subdir, char const *s, size_t len)
{
diff --git a/src/libs6/s6_svstatus_pack.c b/src/libs6/s6_svstatus_pack.c
index ef2d5bd..a769c08 100644
--- a/src/libs6/s6_svstatus_pack.c
+++ b/src/libs6/s6_svstatus_pack.c
@@ -4,7 +4,7 @@
#include <skalibs/uint16.h>
#include <skalibs/uint64.h>
#include <skalibs/tai.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
void s6_svstatus_pack (char *pack, s6_svstatus_t const *sv)
{
@@ -15,8 +15,6 @@ void s6_svstatus_pack (char *pack, s6_svstatus_t const *sv)
pack[34] =
sv->flagpaused |
(sv->flagfinishing << 1) |
- (sv->flagwant << 2) |
- (sv->flagwantup << 3) |
- (sv->flagready << 4) |
- (sv->flagthrottled << 5) ;
+ (sv->flagwantup << 2) |
+ (sv->flagready << 3) ;
}
diff --git a/src/libs6/s6_svstatus_read.c b/src/libs6/s6_svstatus_read.c
index edcf38b..376a0c7 100644
--- a/src/libs6/s6_svstatus_read.c
+++ b/src/libs6/s6_svstatus_read.c
@@ -2,7 +2,7 @@
#include <string.h>
#include <skalibs/djbunix.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
int s6_svstatus_read (char const *dir, s6_svstatus_t *status)
{
diff --git a/src/libs6/s6_svstatus_unpack.c b/src/libs6/s6_svstatus_unpack.c
index b641c8c..59df671 100644
--- a/src/libs6/s6_svstatus_unpack.c
+++ b/src/libs6/s6_svstatus_unpack.c
@@ -4,7 +4,7 @@
#include <skalibs/uint16.h>
#include <skalibs/uint64.h>
#include <skalibs/tai.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
void s6_svstatus_unpack (char const *pack, s6_svstatus_t *sv)
{
@@ -18,8 +18,6 @@ void s6_svstatus_unpack (char const *pack, s6_svstatus_t *sv)
sv->wstat = wstat ;
sv->flagpaused = pack[34] & 1 ;
sv->flagfinishing = !!(pack[34] & 2) ;
- sv->flagwant = !!(pack[34] & 4) ;
- sv->flagwantup = !!(pack[34] & 8) ;
- sv->flagready = !!(pack[34] & 16) ;
- sv->flagthrottled = !!(pack[34] & 32) ;
+ sv->flagwantup = !!(pack[34] & 4) ;
+ sv->flagready = !!(pack[34] & 8) ;
}
diff --git a/src/libs6/s6_svstatus_write.c b/src/libs6/s6_svstatus_write.c
index 29d4f40..a75b3b1 100644
--- a/src/libs6/s6_svstatus_write.c
+++ b/src/libs6/s6_svstatus_write.c
@@ -2,7 +2,7 @@
#include <string.h>
#include <skalibs/djbunix.h>
-#include <s6/s6-supervise.h>
+#include <s6/supervise.h>
int s6_svstatus_write (char const *dir, s6_svstatus_t const *status)
{
diff --git a/src/libs6/s6lock_acquire.c b/src/libs6/s6lock_acquire.c
index e73ace0..fa500aa 100644
--- a/src/libs6/s6lock_acquire.c
+++ b/src/libs6/s6lock_acquire.c
@@ -9,7 +9,7 @@
#include <skalibs/tai.h>
#include <skalibs/gensetdyn.h>
#include <skalibs/textclient.h>
-#include <s6/s6lock.h>
+#include <s6/lock.h>
int s6lock_acquire (s6lock_t *a, uint16_t *u, char const *path, uint32_t options, tain const *limit, tain const *deadline, tain *stamp)
{
diff --git a/src/libs6/s6lock_check.c b/src/libs6/s6lock_check.c
index da08eff..b62d790 100644
--- a/src/libs6/s6lock_check.c
+++ b/src/libs6/s6lock_check.c
@@ -3,7 +3,7 @@
#include <errno.h>
#include <skalibs/error.h>
#include <skalibs/gensetdyn.h>
-#include <s6/s6lock.h>
+#include <s6/lock.h>
int s6lock_check (s6lock_t *a, uint16_t id)
{
diff --git a/src/libs6/s6lock_end.c b/src/libs6/s6lock_end.c
index e278bd8..8611289 100644
--- a/src/libs6/s6lock_end.c
+++ b/src/libs6/s6lock_end.c
@@ -4,7 +4,7 @@
#include <skalibs/genalloc.h>
#include <skalibs/gensetdyn.h>
#include <skalibs/textclient.h>
-#include <s6/s6lock.h>
+#include <s6/lock.h>
void s6lock_end (s6lock_t *a)
{
diff --git a/src/libs6/s6lock_release.c b/src/libs6/s6lock_release.c
index 662b876..96fa3d0 100644
--- a/src/libs6/s6lock_release.c
+++ b/src/libs6/s6lock_release.c
@@ -5,7 +5,7 @@
#include <skalibs/uint16.h>
#include <skalibs/gensetdyn.h>
#include <skalibs/textclient.h>
-#include <s6/s6lock.h>
+#include <s6/lock.h>
int s6lock_release (s6lock_t *a, uint16_t i, tain const *deadline, tain *stamp)
{
diff --git a/src/libs6/s6lock_start.c b/src/libs6/s6lock_start.c
index 6d81628..ca8fcc8 100644
--- a/src/libs6/s6lock_start.c
+++ b/src/libs6/s6lock_start.c
@@ -1,7 +1,7 @@
/* ISC license. */
#include <skalibs/textclient.h>
-#include <s6/s6lock.h>
+#include <s6/lock.h>
int s6lock_start (s6lock_t *a, char const *path, tain const *deadline, tain *stamp)
{
diff --git a/src/libs6/s6lock_startf.c b/src/libs6/s6lock_startf.c
index e58cb46..be6e0c8 100644
--- a/src/libs6/s6lock_startf.c
+++ b/src/libs6/s6lock_startf.c
@@ -3,7 +3,7 @@
#include <errno.h>
#include <skalibs/posixplz.h>
#include <skalibs/textclient.h>
-#include <s6/s6lock.h>
+#include <s6/lock.h>
int s6lock_startf (s6lock_t *a, char const *lockdir, tain const *deadline, tain *stamp)
{
diff --git a/src/libs6/s6lock_update.c b/src/libs6/s6lock_update.c
index fdf1001..4866e7c 100644
--- a/src/libs6/s6lock_update.c
+++ b/src/libs6/s6lock_update.c
@@ -10,7 +10,7 @@
#include <skalibs/gensetdyn.h>
#include <skalibs/textclient.h>
-#include <s6/s6lock.h>
+#include <s6/lock.h>
#include <skalibs/posixishard.h>
diff --git a/src/libs6/s6lock_wait_and.c b/src/libs6/s6lock_wait_and.c
index 801e8a0..eca7946 100644
--- a/src/libs6/s6lock_wait_and.c
+++ b/src/libs6/s6lock_wait_and.c
@@ -2,7 +2,7 @@
#include <errno.h>
#include <skalibs/iopause.h>
-#include <s6/s6lock.h>
+#include <s6/lock.h>
int s6lock_wait_and (s6lock_t *a, uint16_t const *idlist, unsigned int n, tain const *deadline, tain *stamp)
{
diff --git a/src/libs6/s6lock_wait_or.c b/src/libs6/s6lock_wait_or.c
index 421978b..4e2a501 100644
--- a/src/libs6/s6lock_wait_or.c
+++ b/src/libs6/s6lock_wait_or.c
@@ -4,7 +4,7 @@
#include <skalibs/iopause.h>
-#include <s6/s6lock.h>
+#include <s6/lock.h>
#include <skalibs/posixishard.h>
diff --git a/src/libs6/s6lock_zero.c b/src/libs6/s6lock_zero.c
index a4e0138..3d35d40 100644
--- a/src/libs6/s6lock_zero.c
+++ b/src/libs6/s6lock_zero.c
@@ -1,5 +1,5 @@
/* ISC license. */
-#include <s6/s6lock.h>
+#include <s6/lock.h>
s6lock_t const s6lock_zero = S6LOCK_ZERO ;
diff --git a/src/libs6/s6lockd.c b/src/libs6/s6lockd.c
index 764e102..8724019 100644
--- a/src/libs6/s6lockd.c
+++ b/src/libs6/s6lockd.c
@@ -20,7 +20,7 @@
#include <skalibs/textmessage.h>
#include <skalibs/textclient.h>
-#include <s6/s6lock.h>
+#include <s6/lock.h>
#define USAGE "s6lockd lockdir"
#define X() strerr_dief1x(101, "internal inconsistency, please submit a bug-report.")