mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
+26
-26
@@ -26,8 +26,8 @@ static void formatKey(const FFNetIOOptions* options, FFNetIOResult* inf, uint32_
|
||||
{
|
||||
ffStrbufClear(key);
|
||||
FF_PARSE_FORMAT_STRING_CHECKED(key, &options->moduleArgs.key, 2, ((FFformatarg[]){
|
||||
{FF_FORMAT_ARG_TYPE_UINT, &index},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &inf->name},
|
||||
{FF_FORMAT_ARG_TYPE_UINT, &index, "index"},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &inf->name, "name"},
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -80,18 +80,18 @@ void ffPrintNetIO(FFNetIOOptions* options)
|
||||
if (!options->detectTotal) ffStrbufAppendS(&buffer2, "/s");
|
||||
|
||||
FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, FF_NETIO_NUM_FORMAT_ARGS, ((FFformatarg[]){
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &buffer},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &buffer2},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &inf->name},
|
||||
{FF_FORMAT_ARG_TYPE_BOOL, &inf->defaultRoute},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->txBytes},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->rxBytes},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->txPackets},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->rxPackets},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->rxErrors},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->txErrors},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->rxDrops},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->txDrops},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &buffer, "rx-size"},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &buffer2, "tx-size"},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &inf->name, "ifname"},
|
||||
{FF_FORMAT_ARG_TYPE_BOOL, &inf->defaultRoute, "is-default-route"},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->txBytes, "tx-bytes"},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->rxBytes, "rx-bytes"},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->txPackets, "tx-packets"},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->rxPackets, "rx-packets"},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->rxErrors, "rx-errors"},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->txErrors, "tx-errors"},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->rxDrops, "rx-drops"},
|
||||
{FF_FORMAT_ARG_TYPE_UINT64, &inf->txDrops, "tx-drops"},
|
||||
}));
|
||||
}
|
||||
++index;
|
||||
@@ -219,18 +219,18 @@ void ffGenerateNetIOJsonResult(FFNetIOOptions* options, yyjson_mut_doc* doc, yyj
|
||||
void ffPrintNetIOHelpFormat(void)
|
||||
{
|
||||
FF_PRINT_MODULE_FORMAT_HELP_CHECKED(FF_NETIO_MODULE_NAME, "{1} (IN) - {2} (OUT)", FF_NETIO_NUM_FORMAT_ARGS, ((const char* []) {
|
||||
"Size of data received [per second] (formatted)",
|
||||
"Size of data sent [per second] (formatted)",
|
||||
"Interface name",
|
||||
"Is default route",
|
||||
"Size of data received [per second] (in bytes)",
|
||||
"Size of data sent [per second] (in bytes)",
|
||||
"Number of packets received [per second]",
|
||||
"Number of packets sent [per second]",
|
||||
"Number of errors received [per second]",
|
||||
"Number of errors sent [per second]",
|
||||
"Number of packets dropped when receiving [per second]",
|
||||
"Number of packets dropped when sending [per second]",
|
||||
"Size of data received [per second] (formatted) - rx-size",
|
||||
"Size of data sent [per second] (formatted) - tx-size",
|
||||
"Interface name - ifname",
|
||||
"Is default route - is-default-route",
|
||||
"Size of data received [per second] (in bytes) - rx-bytes",
|
||||
"Size of data sent [per second] (in bytes) - tx-bytes",
|
||||
"Number of packets received [per second] - rx-packets",
|
||||
"Number of packets sent [per second] - tx-packets",
|
||||
"Number of errors received [per second] - rx-errors",
|
||||
"Number of errors sent [per second] - tx-errors",
|
||||
"Number of packets dropped when receiving [per second] - rx-drops",
|
||||
"Number of packets dropped when sending [per second] - tx-drops",
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user