diff --git a/sys-utils/irq-common.h b/sys-utils/irq-common.h index 3a4cd6a03..c0853bd8b 100644 --- a/sys-utils/irq-common.h +++ b/sys-utils/irq-common.h @@ -1,6 +1,12 @@ +#ifndef UTIL_LINUX_H_IRQ_COMMON +#define UTIL_LINUX_H_IRQ_COMMON +#include "c.h" +#include "nls.h" + +/* supported columns */ enum { - COL_IRQ = 1, + COL_IRQ = 0, COL_TOTAL, COL_DELTA, COL_NAME, @@ -28,6 +34,7 @@ typedef int (sort_fp)(const struct irq_info *, const struct irq_info *); #define DEF_SORT_FUNC ((sort_fp *)sort_total) +/* output definition */ struct irq_output { int columns[__COL_COUNT * 2]; size_t ncolumns; @@ -73,3 +80,5 @@ sort_fp *set_sort_func(char key); struct libscols_table *get_scols_table(struct irq_output *out, struct irq_stat *prev, struct irq_stat **xstat); + +#endif /* UTIL_LINUX_H_IRQ_COMMON */ diff --git a/sys-utils/irqtop.c b/sys-utils/irqtop.c index 3e8b24bb5..663f93230 100644 --- a/sys-utils/irqtop.c +++ b/sys-utils/irqtop.c @@ -56,10 +56,8 @@ #include -#include "c.h" #include "closestream.h" #include "monotonic.h" -#include "nls.h" #include "pathnames.h" #include "strutils.h" #include "timeutils.h" @@ -70,6 +68,7 @@ #define MAX_EVENTS 3 +/* top control struct */ struct irqtop_ctl { int cols; int rows; @@ -78,9 +77,9 @@ struct irqtop_ctl { char *hostname; unsigned int request_exit:1; - }; +/* user's input parser */ static void parse_input(struct irqtop_ctl *ctl, struct irq_output *out, char c) { switch (c) { @@ -227,8 +226,6 @@ static void __attribute__((__noreturn__)) usage(void) fputs(USAGE_OPTIONS, stdout); fputs(_(" -d, --delay delay updates\n"), stdout); - fputs(_(" --once only display interrupts once, then exit\n"), stdout); - fputs(_(" -J --json output json, implies displaying once\n"), stdout); fputs(_(" -o --output define which output columns to use (see below)\n"), stdout); fputs(_(" -s, --sort specify sort criteria by character (see below)\n"), stdout); fputs(USAGE_SEPARATOR, stdout);