From 82a30bb644b787f106e134dcb8a95bd10f7dcdca Mon Sep 17 00:00:00 2001 From: Matheus Rambo Date: Tue, 21 Dec 2021 20:30:05 -0300 Subject: [PATCH] refactor: Change bughunt mode to 'x' --- doc/nethogs.8 | 4 ++-- src/main.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/nethogs.8 b/doc/nethogs.8 index 7c987b7..0d326a7 100644 --- a/doc/nethogs.8 +++ b/doc/nethogs.8 @@ -8,7 +8,7 @@ nethogs \- Net top tool grouping bandwidth per process .B nethogs .RB [ "\-V" ] .RB [ "\-h" ] -.RB [ "\-b" ] +.RB [ "\-x" ] .RB [ "\-d seconds" ] .RB [ "\-v mode" ] .RB [ "\-c count" ] @@ -32,7 +32,7 @@ prints version. \fB-h\fP prints available commands usage. .TP -\fB-b\fP +\fB-x\fP bughunt mode - implies tracemode. .TP \fB-d\fP diff --git a/src/main.cpp b/src/main.cpp index 50593ee..7e9dc2b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,12 +26,12 @@ static void help(bool iserror) { // output << "usage: nethogs [-V] [-b] [-d seconds] [-t] [-p] [-f (eth|ppp))] // [device [device [device ...]]]\n"; - output << "usage: nethogs [-V] [-h] [-b] [-d seconds] [-v mode] [-c count] " + output << "usage: nethogs [-V] [-h] [-x] [-d seconds] [-v mode] [-c count] " "[-t] [-p] [-s] [-a] [-l] [-f filter] [-C]" "[device [device [device ...]]]\n"; output << " -V : prints version.\n"; output << " -h : prints this help.\n"; - output << " -b : bughunt mode - implies tracemode.\n"; + output << " -x : bughunt mode - implies tracemode.\n"; output << " -d : delay for update refresh rate in seconds. default " "is 1.\n"; output << " -v : view mode (0 = KB/s, 1 = total KB, 2 = total B, 3 " @@ -145,7 +145,7 @@ int main(int argc, char **argv) { int garbage_collection_period = 50; int opt; - while ((opt = getopt(argc, argv, "Vhbtpsd:v:c:laf:Cg:")) != -1) { + while ((opt = getopt(argc, argv, "Vhxtpsd:v:c:laf:Cg:")) != -1) { switch (opt) { case 'V': versiondisplay(); @@ -153,7 +153,7 @@ int main(int argc, char **argv) { case 'h': help(false); exit(0); - case 'b': + case 'x': bughuntmode = true; tracemode = true; break;