ifctrstat: Misc style fixes
This commit is contained in:
parent
05e0ac139b
commit
95d943ee44
2 changed files with 5 additions and 4 deletions
2
Makefile
2
Makefile
|
@ -64,7 +64,7 @@ CPPFLAGS_${CONFIG_IFQUERY} += -DCONFIG_IFQUERY
|
|||
|
||||
# enable ifctrstat applet (+9 KB)
|
||||
CONFIG_IFCTRSTAT ?= Y
|
||||
IFCTRSTAT_SRC = cmd/ifctrstat.c cmd/ifctrstat_linux.c
|
||||
IFCTRSTAT_SRC = cmd/ifctrstat.c cmd/ifctrstat-${LAYOUT}.c
|
||||
MULTICALL_${CONFIG_IFCTRSTAT}_OBJ += ${IFCTRSTAT_SRC:.c=.o}
|
||||
CMDS_${CONFIG_IFCTRSTAT} += ifctrstat
|
||||
CPPFLAGS_${CONFIG_IFCTRSTAT} += -DCONFIG_IFCTRSTAT
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* cmd/ifctrstat_linux.c
|
||||
* Purpose: Implement ifstats system-specific routines for Linux
|
||||
* cmd/ifctrstat-linux.c
|
||||
* Purpose: Implement ifctrstat system-specific routines for Linux
|
||||
*
|
||||
* Copyright (c) 2020 Adélie Software in the Public Benefit, Inc.
|
||||
*
|
||||
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include "multicall.h"
|
||||
|
||||
const char *avail_counters[] = {
|
||||
"rx.octets",
|
||||
|
@ -27,7 +28,7 @@ const char *avail_counters[] = {
|
|||
"tx.errors"
|
||||
};
|
||||
|
||||
size_t avail_counters_count = sizeof(avail_counters) / sizeof(*avail_counters);
|
||||
size_t avail_counters_count = ARRAY_SIZE(avail_counters);
|
||||
|
||||
const char *
|
||||
read_counter(const char *interface, const char *counter)
|
Loading…
Reference in a new issue