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/minutils/s6ps_pfield.c | |
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/minutils/s6ps_pfield.c')
-rw-r--r-- | src/minutils/s6ps_pfield.c | 14 |
1 files changed, 7 insertions, 7 deletions
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 ; |