diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-08-10 17:56:42 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2021-08-10 17:56:42 +0000 |
commit | 76a04a720f7c5a366b88fe2b1727e47103ee796c (patch) | |
tree | 095607d09a95a48cedece6a4e774ad8838c2356e /src | |
parent | 8d37673c24ee9c30d5a78a30671e9598b0f5321d (diff) | |
download | s6-linux-utils-76a04a720f7c5a366b88fe2b1727e47103ee796c.tar.xz |
Prepare for 2.5.1.6 ; adapt to skalibs-2.11.0.0
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/minutils/s6-logwatch.c | 4 | ||||
-rw-r--r-- | src/minutils/s6-mount.c | 2 | ||||
-rw-r--r-- | src/minutils/s6-ps.c | 2 | ||||
-rw-r--r-- | src/minutils/s6-ps.h | 6 | ||||
-rw-r--r-- | src/minutils/s6ps_pfield.c | 14 | ||||
-rw-r--r-- | src/minutils/s6ps_statparse.c | 6 |
6 files changed, 17 insertions, 17 deletions
diff --git a/src/minutils/s6-logwatch.c b/src/minutils/s6-logwatch.c index 28739af..a8675e1 100644 --- a/src/minutils/s6-logwatch.c +++ b/src/minutils/s6-logwatch.c @@ -110,7 +110,7 @@ int main (int argc, char const *const *argv) unsigned int maxlen = 4096 ; PROG = "s6-logwatch" ; { - subgetopt_t l = SUBGETOPT_ZERO ; + subgetopt l = SUBGETOPT_ZERO ; for (;;) { int opt = subgetopt_r(argc, argv, "m:", &l) ; @@ -142,7 +142,7 @@ int main (int argc, char const *const *argv) state = B_WAITING ; } else state = B_READING ; - if (sig_ignore(SIGPIPE) == -1) strerr_diefu1sys(111, "sig_ignore(SIGPIPE)") ; + if (!sig_ignore(SIGPIPE)) strerr_diefu1sys(111, "sig_ignore(SIGPIPE)") ; if (state == B_READING) { if (!readit(fd)) strerr_diefu3sys(111, "read from ", dir, "/current") ; diff --git a/src/minutils/s6-mount.c b/src/minutils/s6-mount.c index 382a0c4..4dd9ed5 100644 --- a/src/minutils/s6-mount.c +++ b/src/minutils/s6-mount.c @@ -112,7 +112,7 @@ int main (int argc, char const *const *argv) PROG = "s6-mount" ; { int doall = 0 ; - subgetopt_t l = SUBGETOPT_ZERO ; + subgetopt l = SUBGETOPT_ZERO ; for (;;) { int opt = subgetopt_r(argc, argv, "nz:arwt:o:", &l) ; diff --git a/src/minutils/s6-ps.c b/src/minutils/s6-ps.c index fa9ce57..39d7211 100644 --- a/src/minutils/s6-ps.c +++ b/src/minutils/s6-ps.c @@ -131,7 +131,7 @@ int main (int argc, char const *const *argv) PROG = "s6-ps" ; { - subgetopt_t l = SUBGETOPT_ZERO ; + subgetopt l = SUBGETOPT_ZERO ; for (;;) { int opt = subgetopt_r(argc, argv, "Hlw:W:o:", &l) ; diff --git a/src/minutils/s6-ps.h b/src/minutils/s6-ps.h index b0aadcc..eb56dc1 100644 --- a/src/minutils/s6-ps.h +++ b/src/minutils/s6-ps.h @@ -140,10 +140,10 @@ extern void s6ps_otree (pscan_t *, unsigned int, avltreen *, unsigned int *) ; extern int s6ps_compute_boottime (pscan_t *, unsigned int) ; -typedef int pfieldfmt_func_t (pscan_t *, size_t *, size_t *) ; -typedef pfieldfmt_func_t *pfieldfmt_func_t_ref ; +typedef int pfieldfmt_func (pscan_t *, size_t *, size_t *) ; +typedef pfieldfmt_func *pfieldfmt_func_ref ; -extern pfieldfmt_func_t_ref *s6ps_pfield_fmt ; +extern pfieldfmt_func_ref *s6ps_pfield_fmt ; extern void *left_dtok (unsigned int, void *) ; extern int uint32_cmp (void const *, void const *, void *) ; diff --git a/src/minutils/s6ps_pfield.c b/src/minutils/s6ps_pfield.c index f2e3f7f..f527d25 100644 --- a/src/minutils/s6ps_pfield.c +++ b/src/minutils/s6ps_pfield.c @@ -91,7 +91,7 @@ static char const *const opttable[PFIELD_PHAIL] = char const *const *s6ps_opttable = opttable ; -static tain_t boottime = TAIN_EPOCH ; +static tain boottime = TAIN_EPOCH ; static int fmt_64 (pscan_t *p, size_t *pos, size_t *len, uint64_t u) { @@ -204,7 +204,7 @@ int s6ps_compute_boottime (pscan_t *p, unsigned int mypos) else { unsigned int hz = gethz() ; - tain_t offset = { .sec = { .x = p[mypos].start / hz }, .nano = (p[mypos].start % hz) * (1000000000 / hz) } ; + tain offset = { .sec = { .x = p[mypos].start / hz }, .nano = (p[mypos].start % hz) * (1000000000 / hz) } ; tain_sub(&boottime, &STAMP, &offset) ; return 1 ; } @@ -309,7 +309,7 @@ static int fmt_start (pscan_t *p, size_t *pos, size_t *len) { struct tm starttm ; unsigned int hz = gethz() ; - tain_t blah = { .sec = { .x = p->start / hz }, .nano = (p->start % hz) * (1000000000 / hz) } ; + tain blah = { .sec = { .x = p->start / hz }, .nano = (p->start % hz) * (1000000000 / hz) } ; tain_add(&blah, &boottime, &blah) ; if (!localtm_from_tai(&starttm, tain_secp(&blah), 1)) return 0 ; return fmt_timedate(p, pos, len, &starttm) ; @@ -479,7 +479,7 @@ static int fmt_env (pscan_t *p, size_t *pos, size_t *len) static uint64_t gettotalj (uint64_t j) { - tain_t totaltime ; + tain totaltime ; unsigned int hz = gethz() ; tain_sub(&totaltime, &STAMP, &boottime) ; j = totaltime.sec.x * hz + totaltime.nano / (1000000000 / hz) - j ; @@ -506,7 +506,7 @@ static int fmt_cttime (pscan_t *p, size_t *pos, size_t *len) static int fmt_tstart (pscan_t *p, size_t *pos, size_t *len) { unsigned int hz = gethz() ; - tain_t blah = { .sec = { .x = p->start / hz }, .nano = (p->start % hz) * (1000000000 / hz) } ; + tain blah = { .sec = { .x = p->start / hz }, .nano = (p->start % hz) * (1000000000 / hz) } ; if (!stralloc_readyplus(&p->data, TIMESTAMP)) return 0 ; tain_add(&blah, &boottime, &blah) ; *pos = p->data.len ; @@ -520,7 +520,7 @@ static int fmt_cpcpu (pscan_t *p, size_t *pos, size_t *len) return percent(&p->data, 10000 * (p->utime + p->stime + p->cutime + p->cstime) / gettotalj(p->start), pos, len) ; } -static pfieldfmt_func_t_ref pfieldfmt_table[PFIELD_PHAIL] = +static pfieldfmt_func_ref pfieldfmt_table[PFIELD_PHAIL] = { &fmt_pid, &fmt_comm, @@ -557,4 +557,4 @@ static pfieldfmt_func_t_ref pfieldfmt_table[PFIELD_PHAIL] = &fmt_cpcpu } ; -pfieldfmt_func_t_ref *s6ps_pfield_fmt = pfieldfmt_table ; +pfieldfmt_func_ref *s6ps_pfield_fmt = pfieldfmt_table ; diff --git a/src/minutils/s6ps_statparse.c b/src/minutils/s6ps_statparse.c index 56e00f9..fe4c355 100644 --- a/src/minutils/s6ps_statparse.c +++ b/src/minutils/s6ps_statparse.c @@ -17,8 +17,8 @@ #define STATVARS 49 -typedef size_t scanfunc_t (char const *, void *) ; -typedef scanfunc_t *scanfunc_t_ref ; +typedef size_t sca$1_func (char const *, void *) ; +typedef sca$1_func *sca$1_func_ref ; static size_t f64 (char const *s, void *u64) { @@ -48,7 +48,7 @@ DEFUNS(fint, int) DEFUNS(fpid, pid_t) DEFUNU(fdev, dev_t) -static scanfunc_t_ref scanfuncs[STATVARS] = +static sca$1_func_ref scanfuncs[STATVARS] = { &fpid, /* ppid */ &fpid, /* pgrp */ |