summaryrefslogtreecommitdiff
path: root/src/shutdown/s6-linux-init-shutdown.c
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/shutdown/s6-linux-init-shutdown.c
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/shutdown/s6-linux-init-shutdown.c')
-rw-r--r--src/shutdown/s6-linux-init-shutdown.c16
1 files changed, 8 insertions, 8 deletions
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) ;