mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
LocalIP: support MTU in localip-format
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include "util/stringUtils.h"
|
||||
|
||||
#define FF_LOCALIP_DISPLAY_NAME "Local IP"
|
||||
#define FF_LOCALIP_NUM_FORMAT_ARGS 5
|
||||
#define FF_LOCALIP_NUM_FORMAT_ARGS 6
|
||||
#pragma GCC diagnostic ignored "-Wsign-conversion"
|
||||
|
||||
static int sortIps(const FFLocalIpResult* left, const FFLocalIpResult* right)
|
||||
@@ -116,6 +116,7 @@ void ffPrintLocalIp(FFLocalIpOptions* options)
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &ip->mac, "mac"},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &ip->name, "ifname"},
|
||||
{FF_FORMAT_ARG_TYPE_BOOL, &ip->defaultRoute, "is-default-route"},
|
||||
{FF_FORMAT_ARG_TYPE_INT, &ip->mtu, "mtu"},
|
||||
}));
|
||||
}
|
||||
++index;
|
||||
@@ -392,7 +393,8 @@ void ffPrintLocalIpHelpFormat(void)
|
||||
"Local IPv6 address - ipv6",
|
||||
"Physical (MAC) address - mac",
|
||||
"Interface name - ifname",
|
||||
"Is default route - is-default-route"
|
||||
"Is default route - is-default-route",
|
||||
"MTU size in bytes - mtu",
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user