summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/s6-rc/s6rc-servicedir.h2
-rw-r--r--src/libs6rc/s6rc_servicedir_manage.c2
-rw-r--r--src/s6-rc/s6-rc-bundle.c2
-rw-r--r--src/s6-rc/s6-rc-compile.c2
-rw-r--r--src/s6-rc/s6-rc-db.c2
-rw-r--r--src/s6-rc/s6-rc-dryrun.c4
-rw-r--r--src/s6-rc/s6-rc-fdholder-filler.c6
-rw-r--r--src/s6-rc/s6-rc-format-upgrade.c6
-rw-r--r--src/s6-rc/s6-rc-init.c4
-rw-r--r--src/s6-rc/s6-rc-oneshot-run.c2
-rw-r--r--src/s6-rc/s6-rc-update.c24
-rw-r--r--src/s6-rc/s6-rc.c8
12 files changed, 32 insertions, 32 deletions
diff --git a/src/include/s6-rc/s6rc-servicedir.h b/src/include/s6-rc/s6rc-servicedir.h
index 1648975..c51fe3c 100644
--- a/src/include/s6-rc/s6rc-servicedir.h
+++ b/src/include/s6-rc/s6rc-servicedir.h
@@ -12,7 +12,7 @@ extern int s6rc_servicedir_copy_online (char const *, char const *) ;
#define s6rc_servicedir_copy(src, dst, h) ((h) ? s6rc_servicedir_copy_online(src, dst) : s6rc_servicedir_copy_offline(src, dst))
extern void s6rc_servicedir_unsupervise (char const *, char const *, char const *, int) ;
-extern int s6rc_servicedir_manage (char const *, char const *, tain_t const *, tain_t *) ;
+extern int s6rc_servicedir_manage (char const *, char const *, tain const *, tain *) ;
#define s6rc_servicedir_manage_g(live, suffix, deadline) s6rc_servicedir_manage(live, suffix, (deadline), &STAMP)
#endif
diff --git a/src/libs6rc/s6rc_servicedir_manage.c b/src/libs6rc/s6rc_servicedir_manage.c
index ddcfe84..fb59da2 100644
--- a/src/libs6rc/s6rc_servicedir_manage.c
+++ b/src/libs6rc/s6rc_servicedir_manage.c
@@ -10,7 +10,7 @@
#include <s6-rc/s6rc-servicedir.h>
-int s6rc_servicedir_manage (char const *live, char const *prefix, tain_t const *deadline, tain_t *stamp)
+int s6rc_servicedir_manage (char const *live, char const *prefix, tain const *deadline, tain *stamp)
{
stralloc names = STRALLOC_ZERO ;
size_t livelen = strlen(live) ;
diff --git a/src/s6-rc/s6-rc-bundle.c b/src/s6-rc/s6-rc-bundle.c
index 9ba5084..9db5680 100644
--- a/src/s6-rc/s6-rc-bundle.c
+++ b/src/s6-rc/s6-rc-bundle.c
@@ -232,7 +232,7 @@ int main (int argc, char const **argv)
int blocking = 0 ;
PROG = "s6-rc-bundle" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "fl:c:b", &l) ;
diff --git a/src/s6-rc/s6-rc-compile.c b/src/s6-rc/s6-rc-compile.c
index 4e9f270..374946f 100644
--- a/src/s6-rc/s6-rc-compile.c
+++ b/src/s6-rc/s6-rc-compile.c
@@ -1461,7 +1461,7 @@ int main (int argc, char const *const *argv)
int blocking = 0 ;
PROG = "s6-rc-compile" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "v:u:g:h:b", &l) ;
diff --git a/src/s6-rc/s6-rc-db.c b/src/s6-rc/s6-rc-db.c
index 5650124..d2fb0be 100644
--- a/src/s6-rc/s6-rc-db.c
+++ b/src/s6-rc/s6-rc-db.c
@@ -326,7 +326,7 @@ int main (int argc, char const *const *argv)
int blocking = 0 ;
PROG = "s6-rc-db" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "udl:c:b", &l) ;
diff --git a/src/s6-rc/s6-rc-dryrun.c b/src/s6-rc/s6-rc-dryrun.c
index dda5a03..5f24035 100644
--- a/src/s6-rc/s6-rc-dryrun.c
+++ b/src/s6-rc/s6-rc-dryrun.c
@@ -13,11 +13,11 @@
int main (int argc, char const *const *argv)
{
unsigned int verbosity = 1 ;
- tain_t deadline ;
+ tain deadline ;
PROG = "s6-rc-dryrun" ;
{
unsigned int t = 1000 ;
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "v:t:", &l) ;
diff --git a/src/s6-rc/s6-rc-fdholder-filler.c b/src/s6-rc/s6-rc-fdholder-filler.c
index 9b28bb1..efb29f1 100644
--- a/src/s6-rc/s6-rc-fdholder-filler.c
+++ b/src/s6-rc/s6-rc-fdholder-filler.c
@@ -55,7 +55,7 @@ static inline unsigned int parse_servicenames (char *s, unsigned int *indices)
int main (int argc, char const *const *argv)
{
s6_fdholder_t a = S6_FDHOLDER_ZERO ;
- tain_t deadline ;
+ tain deadline ;
int notif = 0 ;
unsigned int n ;
unsigned int indices[N] ;
@@ -63,7 +63,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-rc-fdholder-filler" ;
{
unsigned int t = 0 ;
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "1t:", &l) ;
@@ -88,7 +88,7 @@ int main (int argc, char const *const *argv)
n = parse_servicenames(buf, indices) ;
if (n)
{
- tain_t offset = { .sec = TAI_ZERO } ;
+ tain offset = { .sec = TAI_ZERO } ;
int p[2] ;
unsigned int i = 0 ;
s6_fdholder_fd_t dump[n<<1] ;
diff --git a/src/s6-rc/s6-rc-format-upgrade.c b/src/s6-rc/s6-rc-format-upgrade.c
index e2049de..4545f30 100644
--- a/src/s6-rc/s6-rc-format-upgrade.c
+++ b/src/s6-rc/s6-rc-format-upgrade.c
@@ -19,7 +19,7 @@ static unsigned int verbosity = 1 ;
/* This function will change if format changes become heavier */
-static inline void update_livedir (char const *live, char const *newcompiled, tain_t const *deadline)
+static inline void update_livedir (char const *live, char const *newcompiled, tain const *deadline)
{
size_t livelen = strlen(live) ;
char cfn[livelen + 10] ;
@@ -32,14 +32,14 @@ static inline void update_livedir (char const *live, char const *newcompiled, ta
int main (int argc, char const *const *argv, char const *const *envp)
{
- tain_t deadline ;
+ tain deadline ;
char const *live = S6RC_LIVE_BASE ;
int blocking = 0 ;
int livelock ;
PROG = "s6-rc-format-upgrade" ;
{
unsigned int t = 0 ;
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "v:t:l:b", &l) ;
diff --git a/src/s6-rc/s6-rc-init.c b/src/s6-rc/s6-rc-init.c
index 3398f23..a9fd4b0 100644
--- a/src/s6-rc/s6-rc-init.c
+++ b/src/s6-rc/s6-rc-init.c
@@ -29,7 +29,7 @@ static void cleanup (stralloc *sa)
int main (int argc, char const *const *argv)
{
- tain_t deadline ;
+ tain deadline ;
stralloc sa = STRALLOC_ZERO ;
size_t dirlen ;
char const *live = S6RC_LIVE_BASE ;
@@ -39,7 +39,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-rc-init" ;
{
unsigned int t = 0 ;
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "c:l:p:t:bd", &l) ;
diff --git a/src/s6-rc/s6-rc-oneshot-run.c b/src/s6-rc/s6-rc-oneshot-run.c
index a544b74..9caef10 100644
--- a/src/s6-rc/s6-rc-oneshot-run.c
+++ b/src/s6-rc/s6-rc-oneshot-run.c
@@ -25,7 +25,7 @@ int main (int argc, char const *const *argv)
int blocking = 0 ;
PROG = "s6-rc-oneshot-run" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "l:b", &l) ;
diff --git a/src/s6-rc/s6-rc-update.c b/src/s6-rc/s6-rc-update.c
index 2a308a9..cda92d3 100644
--- a/src/s6-rc/s6-rc-update.c
+++ b/src/s6-rc/s6-rc-update.c
@@ -385,7 +385,7 @@ static inline void make_new_livedir (unsigned char const *oldstate, s6rc_db_t co
/* Updating the pipes contained in the fdholder */
-static inline int delete_unused_pipes (s6_fdholder_t *a, s6rc_db_t const *olddb, unsigned char const *oldstate, tain_t const *deadline)
+static inline int delete_unused_pipes (s6_fdholder_t *a, s6rc_db_t const *olddb, unsigned char const *oldstate, tain const *deadline)
{
unsigned int i = olddb->nlong ;
while (i--)
@@ -402,10 +402,10 @@ static inline int delete_unused_pipes (s6_fdholder_t *a, s6rc_db_t const *olddb,
return 1 ;
}
-static inline int rename_pipes (s6_fdholder_t *a, s6rc_db_t const *olddb, s6rc_db_t const *newdb, unsigned char const *newstate, unsigned int const *invimage, tain_t const *deadline)
+static inline int rename_pipes (s6_fdholder_t *a, s6rc_db_t const *olddb, s6rc_db_t const *newdb, unsigned char const *newstate, unsigned int const *invimage, tain const *deadline)
{
- tain_t nano1 = { .sec = TAI_ZERO, .nano = 1 } ;
- tain_t limit ;
+ tain nano1 = { .sec = TAI_ZERO, .nano = 1 } ;
+ tain limit ;
tain_add_g(&limit, &tain_infinite_relative) ;
unsigned int i = newdb->nlong ;
while (i--)
@@ -446,10 +446,10 @@ static inline int rename_pipes (s6_fdholder_t *a, s6rc_db_t const *olddb, s6rc_d
return 1 ;
}
-static inline int create_new_pipes (s6_fdholder_t *a, s6rc_db_t const *newdb, unsigned char const *newstate, tain_t const *deadline)
+static inline int create_new_pipes (s6_fdholder_t *a, s6rc_db_t const *newdb, unsigned char const *newstate, tain const *deadline)
{
- tain_t nano1 = { .sec = TAI_ZERO, .nano = newdb->nlong % 1000000000U } ;
- tain_t limit ;
+ tain nano1 = { .sec = TAI_ZERO, .nano = newdb->nlong % 1000000000U } ;
+ tain limit ;
unsigned int i = newdb->nlong ;
tain_add_g(&limit, &tain_infinite_relative) ;
tain_add(&limit, &limit, &nano1) ;
@@ -485,10 +485,10 @@ static inline int create_new_pipes (s6_fdholder_t *a, s6rc_db_t const *newdb, un
return 1 ;
}
-static void fill_tfmt (char *tfmt, tain_t const *deadline)
+static void fill_tfmt (char *tfmt, tain const *deadline)
{
int t ;
- tain_t tto ;
+ tain tto ;
tain_sub(&tto, deadline, &STAMP) ;
t = tain_to_millisecs(&tto) ;
if (!t) t = 1 ;
@@ -496,7 +496,7 @@ static void fill_tfmt (char *tfmt, tain_t const *deadline)
tfmt[uint_fmt(tfmt, t)] = 0 ;
}
-static inline void update_fdholder (s6rc_db_t const *olddb, unsigned char const *oldstate, s6rc_db_t const *newdb, unsigned char const *newstate, unsigned int const *invimage, char const *const *envp, tain_t const *deadline)
+static inline void update_fdholder (s6rc_db_t const *olddb, unsigned char const *oldstate, s6rc_db_t const *newdb, unsigned char const *newstate, unsigned int const *invimage, char const *const *envp, tain const *deadline)
{
s6_fdholder_t a = S6_FDHOLDER_ZERO ;
char fnsocket[livelen + sizeof("/servicedirs/" S6RC_FDHOLDER "/s")] ;
@@ -546,13 +546,13 @@ static unsigned int want_count (unsigned char const *state, unsigned int n)
int main (int argc, char const *const *argv, char const *const *envp)
{
char const *convfile = "/dev/null" ;
- tain_t deadline ;
+ tain deadline ;
int dryrun = 0 ;
int blocking = 0 ;
PROG = "s6-rc-update" ;
{
unsigned int t = 0 ;
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "v:t:nl:f:b", &l) ;
diff --git a/src/s6-rc/s6-rc.c b/src/s6-rc/s6-rc.c
index 0c67722..45f9069 100644
--- a/src/s6-rc/s6-rc.c
+++ b/src/s6-rc/s6-rc.c
@@ -45,7 +45,7 @@ static s6rc_db_t *db ;
static unsigned int n ;
static unsigned char *state ;
static unsigned int *pendingdeps ;
-static tain_t deadline ;
+static tain deadline ;
static int lameduck = 0 ;
static int forcestop = 0 ;
static char dryrun[UINT_FMT] = "" ;
@@ -112,7 +112,7 @@ static uint32_t compute_timeout (unsigned int i, int h)
{
uint32_t t = db->services[i].timeout[h] ;
int globalt ;
- tain_t globaltto ;
+ tain globaltto ;
tain_sub(&globaltto, &deadline, &STAMP) ;
globalt = tain_to_millisecs(&globaltto) ;
if (!globalt) globalt = 1 ;
@@ -468,7 +468,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-rc" ;
{
unsigned int t = 0 ;
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "v:n:t:l:uDdpaXb", &l) ;
@@ -654,7 +654,7 @@ int main (int argc, char const *const *argv)
sigaddset(&set, SIGCHLD) ;
sigaddset(&set, SIGTERM) ;
sigaddset(&set, SIGINT) ;
- if (selfpipe_trapset(&set) < 0)
+ if (!selfpipe_trapset(&set))
strerr_diefu1sys(111, "trap signals") ;
}