return NULL;
}
+static struct libscols_line *new_scols_line(struct libscols_table *table)
+{
+ struct libscols_line *line = scols_table_new_line(table, NULL);
+ if (!line) {
+ warn(_("failed to add line to output"));
+ return NULL;
+ }
+ return line;
+}
+
static void add_scols_line(struct irq_output *out,
struct irq_info *info,
struct libscols_table *table)
{
size_t i;
- struct libscols_line *line;
-
- line = scols_table_new_line(table, NULL);
- if (!line) {
- warn(_("failed to add line to output"));
- return;
- }
+ struct libscols_line *line = new_scols_line(table);
for (i = 0; i < out->ncolumns; i++) {
char *str = NULL;
}
/* per cpu % of total */
- ln = scols_table_new_line(table, NULL);
- if (!ln) {
- warn(_("failed to add line to output"));
+ ln = new_scols_line(table);
+ if (!ln)
goto err;
- }
if (!out->json)
scols_line_set_data(ln, 0, "%irq:");
}
/* per cpu % of delta */
- ln = scols_table_new_line(table, NULL);
- if (!ln) {
- warn(_("failed to add line to output"));
+ ln = new_scols_line(table);
+ if (!ln)
goto err;
- }
if (!out->json)
- scols_line_set_data(ln, 0, "%delta:");
+ scols_line_set_data(ln, 0, _("%delta:"));
for (i = 0; i < curr->nr_active_cpu; i++) {
struct irq_cpu *cpu = &curr->cpus[i];
};
struct irq_stat {
- unsigned int nr_irq; /* number of irq vector */
- unsigned int nr_irq_info; /* number of irq info */
+ unsigned long nr_irq; /* number of irq vector */
+ unsigned long nr_irq_info; /* number of irq info */
struct irq_info *irq_info; /* array of irq_info */
struct irq_cpu *cpus; /* array of irq_cpu */
size_t nr_active_cpu; /* number of active cpu */