summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/minutils/s6-logwatch.c4
-rw-r--r--src/minutils/s6-mount.c2
-rw-r--r--src/minutils/s6-ps.c2
-rw-r--r--src/minutils/s6-ps.h6
-rw-r--r--src/minutils/s6ps_pfield.c14
-rw-r--r--src/minutils/s6ps_statparse.c6
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 */