summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-08-10 18:24:46 +0000
committerLaurent Bercot <ska@appnovation.com>2021-08-10 18:24:46 +0000
commit6696cee3bd309f61fc6c945ef747262a845e9267 (patch)
tree6bb1a8f54ff0a590d375aece2af01009c94d9206 /src
parent4a773dc6d9d36844501994720aca31a4f50d7d52 (diff)
downloads6-linux-init-6696cee3bd309f61fc6c945ef747262a845e9267.tar.xz
Prepare for 1.0.6.4, adapt to skalibs-2.11.0.0
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r--src/init/s6-linux-init-maker.c8
-rw-r--r--src/init/s6-linux-init-telinit.c2
-rw-r--r--src/init/s6-linux-init.c2
-rw-r--r--src/misc/s6-linux-init-echo.c2
-rw-r--r--src/shutdown/hpr.h2
-rw-r--r--src/shutdown/hpr_shutdown.c2
-rw-r--r--src/shutdown/s6-linux-init-hpr.c2
-rw-r--r--src/shutdown/s6-linux-init-shutdown.c16
-rw-r--r--src/shutdown/s6-linux-init-shutdownd.c14
9 files changed, 25 insertions, 25 deletions
diff --git a/src/init/s6-linux-init-maker.c b/src/init/s6-linux-init-maker.c
index bc06836..2cfb35e 100644
--- a/src/init/s6-linux-init-maker.c
+++ b/src/init/s6-linux-init-maker.c
@@ -64,8 +64,8 @@ static gid_t mygid = -1 ;
static char const *utmp_user = 0 ;
#endif
-typedef int writetobuf_func_t (buffer *, char const *) ;
-typedef writetobuf_func_t *writetobuf_func_t_ref ;
+typedef int writetobuf_func (buffer *, char const *) ;
+typedef writetobuf_func *writetobuf_func_ref ;
#define put_shebang(b) put_shebang_options((b), 0)
@@ -383,7 +383,7 @@ static void auto_fifo (char const *base, char const *fifo)
}
}
-static void auto_script (char const *base, char const *file, writetobuf_func_t_ref scriptf, char const *data)
+static void auto_script (char const *base, char const *file, writetobuf_func_ref scriptf, char const *data)
{
char buf[4096] ;
buffer b ;
@@ -639,7 +639,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
{
PROG = "s6-linux-init-maker" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, OPTION_STRING, &l) ;
diff --git a/src/init/s6-linux-init-telinit.c b/src/init/s6-linux-init-telinit.c
index 2baa6c2..65fb491 100644
--- a/src/init/s6-linux-init-telinit.c
+++ b/src/init/s6-linux-init-telinit.c
@@ -22,7 +22,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
char const *newargv[8] = { S6_EXTBINPREFIX "s6-sudo", "-e", "-T", "3600000", "--", RUNLEVELD_PATH, 0, 0 } ;
PROG = "s6-linux-init-telinit" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "c:p:s:m:d:D:nNCB", &l) ;
diff --git a/src/init/s6-linux-init.c b/src/init/s6-linux-init.c
index 9e2d86e..6bf22b8 100644
--- a/src/init/s6-linux-init.c
+++ b/src/init/s6-linux-init.c
@@ -136,7 +136,7 @@ int main (int argc, char const **argv, char const *const *envp)
}
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "c:p:s:m:d:D:nNCB", &l) ;
diff --git a/src/misc/s6-linux-init-echo.c b/src/misc/s6-linux-init-echo.c
index 483efe2..a59eae7 100644
--- a/src/misc/s6-linux-init-echo.c
+++ b/src/misc/s6-linux-init-echo.c
@@ -12,7 +12,7 @@ int main (int argc, char const *const *argv)
char donl = 1 ;
PROG = "s6-linux-init-echo" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "ns:", &l) ;
diff --git a/src/shutdown/hpr.h b/src/shutdown/hpr.h
index 2c545a5..fd268e8 100644
--- a/src/shutdown/hpr.h
+++ b/src/shutdown/hpr.h
@@ -17,7 +17,7 @@
#define hpr_send(s, n) openwritenclose_unsafe(INITCTL, (s), n)
#define hpr_cancel() hpr_send("c", 1)
-extern int hpr_shutdown (unsigned int, tain_t const *, unsigned int) ;
+extern int hpr_shutdown (unsigned int, tain const *, unsigned int) ;
extern void hpr_wall (char const *) ;
extern void hpr_wallv (struct iovec const *, unsigned int) ;
extern void hpr_confirm_hostname (void) ;
diff --git a/src/shutdown/hpr_shutdown.c b/src/shutdown/hpr_shutdown.c
index 3ede92d..c5e98b1 100644
--- a/src/shutdown/hpr_shutdown.c
+++ b/src/shutdown/hpr_shutdown.c
@@ -7,7 +7,7 @@
#include "hpr.h"
-int hpr_shutdown (unsigned int what, tain_t const *when, unsigned int grace)
+int hpr_shutdown (unsigned int what, tain const *when, unsigned int grace)
{
char pack[5 + TAIN_PACK] = { "Shpr"[what] } ;
tain_pack(pack+1, when) ;
diff --git a/src/shutdown/s6-linux-init-hpr.c b/src/shutdown/s6-linux-init-hpr.c
index a874ac3..fe8a77d 100644
--- a/src/shutdown/s6-linux-init-hpr.c
+++ b/src/shutdown/s6-linux-init-hpr.c
@@ -46,7 +46,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-linux-init-hpr" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "hprfdwWni", &l) ;
diff --git a/src/shutdown/s6-linux-init-shutdown.c b/src/shutdown/s6-linux-init-shutdown.c
index ce7f01f..2e81c3b 100644
--- a/src/shutdown/s6-linux-init-shutdown.c
+++ b/src/shutdown/s6-linux-init-shutdown.c
@@ -49,9 +49,9 @@ static inline void add_one_day (struct tm *tm)
tm->tm_year++ ;
}
-static inline void parse_hourmin (tain_t *when, char const *s)
+static inline void parse_hourmin (tain *when, char const *s)
{
- tai_t taithen ;
+ tai taithen ;
struct tm tmthen ;
unsigned int hour, minute ;
size_t len = uint_scan(s, &hour) ;
@@ -67,25 +67,25 @@ static inline void parse_hourmin (tain_t *when, char const *s)
tmthen.tm_min = minute ;
tmthen.tm_sec = 0 ;
if (!tai_from_localtm(&taithen, &tmthen))
- strerr_diefu1sys(111, "assemble broken-down time into tain_t") ;
+ strerr_diefu1sys(111, "assemble broken-down time into tain") ;
if (tai_less(&taithen, tain_secp(&STAMP)))
{
add_one_day(&tmthen) ;
if (!tai_from_localtm(&taithen, &tmthen))
- strerr_diefu1sys(111, "assemble broken-down time into tain_t") ;
+ strerr_diefu1sys(111, "assemble broken-down time into tain") ;
}
when->sec = taithen ;
when->nano = 0 ;
}
-static void parse_mins (tain_t *when, char const *s)
+static void parse_mins (tain *when, char const *s)
{
unsigned int mins ;
if (!uint0_scan(s, &mins)) dieusage() ;
tain_addsec_g(when, mins * 60) ;
}
-static inline void parse_time (tain_t *when, char const *s)
+static inline void parse_time (tain *when, char const *s)
{
if (!strcmp(s, "now")) tain_copynow(when) ;
else if (s[0] == '+') parse_mins(when, s+1) ;
@@ -257,11 +257,11 @@ int main (int argc, char const *const *argv)
int doactl = 0 ;
int docancel = 0 ;
int doconfirm = 0 ;
- tain_t when ;
+ tain when ;
PROG = "s6-linux-init-shutdown" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "HPhprkafFcit:", &l) ;
diff --git a/src/shutdown/s6-linux-init-shutdownd.c b/src/shutdown/s6-linux-init-shutdownd.c
index 16e0780..e448b92 100644
--- a/src/shutdown/s6-linux-init-shutdownd.c
+++ b/src/shutdown/s6-linux-init-shutdownd.c
@@ -100,7 +100,7 @@ static inline void run_stage3 (char const *basedir)
else strerr_warnwu2sys("spawn ", stage3) ;
}
-static inline void prepare_shutdown (buffer *b, tain_t *deadline, unsigned int *grace_time)
+static inline void prepare_shutdown (buffer *b, tain *deadline, unsigned int *grace_time)
{
uint32_t u ;
char pack[TAIN_PACK + 4] ;
@@ -113,7 +113,7 @@ static inline void prepare_shutdown (buffer *b, tain_t *deadline, unsigned int *
if (u && u <= 300000) *grace_time = u ;
}
-static inline void handle_fifo (buffer *b, char *what, tain_t *deadline, unsigned int *grace_time)
+static inline void handle_fifo (buffer *b, char *what, tain *deadline, unsigned int *grace_time)
{
for (;;)
{
@@ -255,7 +255,7 @@ static inline void unsupervise_tree (void)
int main (int argc, char const *const *argv)
{
unsigned int grace_time = 3000 ;
- tain_t deadline ;
+ tain deadline ;
int fdr, fdw ;
buffer b ;
char what = 'S' ;
@@ -263,7 +263,7 @@ int main (int argc, char const *const *argv)
PROG = "s6-linux-init-shutdownd" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "c:g:CB", &l) ;
@@ -312,8 +312,8 @@ int main (int argc, char const *const *argv)
fdw = open_write(SHUTDOWND_FIFO) ;
if (fdw == -1 || coe(fdw) == -1)
strerr_diefu3sys(111, "open ", SHUTDOWND_FIFO, " for writing") ;
- if (sig_ignore(SIGPIPE) == -1)
- strerr_diefu1sys(111, "sig_ignore SIGPIPE") ;
+ if (!sig_altignore(SIGPIPE))
+ strerr_diefu1sys(111, "ignore SIGPIPE") ;
buffer_init(&b, &buffer_read, fdr, buf, 64) ;
tain_now_set_stopwatch_g() ;
tain_add_g(&deadline, &tain_infinite_relative) ;
@@ -344,7 +344,7 @@ int main (int argc, char const *const *argv)
prepare_stage4(basedir, what) ;
unsupervise_tree() ;
- if (sig_ignore(SIGTERM) == -1) strerr_warnwu1sys("sig_ignore SIGTERM") ;
+ if (!sig_ignore(SIGTERM)) strerr_warnwu1sys("ignore SIGTERM") ;
if (!inns)
{
sync() ;