1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

Increase default number of net interfaces.

This should resolve the issue noted in #564.
This commit is contained in:
Brenden Matthews 2019-04-03 08:17:53 -04:00
parent 1fa674252d
commit 84ceeff23f
4 changed files with 4 additions and 4 deletions

View File

@ -127,7 +127,7 @@ set(MAX_USER_TEXT_DEFAULT "16384"
"Default maximum size of config TEXT buffer, i.e. below TEXT line.")
set(DEFAULT_TEXT_BUFFER_SIZE "256"
CACHE STRING "Default size used for temporary, static text buffers")
set(MAX_NET_INTERFACES "64" CACHE STRING "Maximum number of network devices")
set(MAX_NET_INTERFACES "256" CACHE STRING "Maximum number of network devices")
# Platform specific options Linux only
if(OS_LINUX)

View File

@ -103,7 +103,7 @@ char e_iface[50];
/* To use ${iface X} where X is a number and will
* return the current X NIC name */
static const unsigned int iface_len = 64U;
char interfaces_arr[iface_len][iface_len] = {""};
char interfaces_arr[MAX_NET_INTERFACES][iface_len] = {""};
#define SHORTSTAT_TEMPL "%*s %llu %llu %llu"
#define LONGSTAT_TEMPL "%*s %llu %llu %llu "

View File

@ -60,6 +60,6 @@ void print_distribution(struct text_object *, char *, unsigned int);
void determine_longstat_file(void);
extern char e_iface[50];
extern char interfaces_arr[64][64];
extern char interfaces_arr[MAX_NET_INTERFACES][64];
#endif /* _LINUX_H */

View File

@ -54,7 +54,7 @@
#include "linux.h"
#else
static char e_iface[50] = "empty";
static char interfaces_arr[64][64] = {""};
static char interfaces_arr[MAX_NET_INTERFACES][64] = {""};
#endif /* __linux__ */
/* network interface stuff */