refactor: Change bughunt mode to 'x'

This commit is contained in:
Matheus Rambo
2021-12-21 20:30:05 -03:00
committed by Matheus Rambo
parent 54f88038f6
commit 82a30bb644
2 changed files with 6 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ nethogs \- Net top tool grouping bandwidth per process
.B nethogs .B nethogs
.RB [ "\-V" ] .RB [ "\-V" ]
.RB [ "\-h" ] .RB [ "\-h" ]
.RB [ "\-b" ] .RB [ "\-x" ]
.RB [ "\-d seconds" ] .RB [ "\-d seconds" ]
.RB [ "\-v mode" ] .RB [ "\-v mode" ]
.RB [ "\-c count" ] .RB [ "\-c count" ]
@@ -32,7 +32,7 @@ prints version.
\fB-h\fP \fB-h\fP
prints available commands usage. prints available commands usage.
.TP .TP
\fB-b\fP \fB-x\fP
bughunt mode - implies tracemode. bughunt mode - implies tracemode.
.TP .TP
\fB-d\fP \fB-d\fP

View File

@@ -26,12 +26,12 @@ static void help(bool iserror) {
// output << "usage: nethogs [-V] [-b] [-d seconds] [-t] [-p] [-f (eth|ppp))] // output << "usage: nethogs [-V] [-b] [-d seconds] [-t] [-p] [-f (eth|ppp))]
// [device [device [device ...]]]\n"; // [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]" "[-t] [-p] [-s] [-a] [-l] [-f filter] [-C]"
"[device [device [device ...]]]\n"; "[device [device [device ...]]]\n";
output << " -V : prints version.\n"; output << " -V : prints version.\n";
output << " -h : prints this help.\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 " output << " -d : delay for update refresh rate in seconds. default "
"is 1.\n"; "is 1.\n";
output << " -v : view mode (0 = KB/s, 1 = total KB, 2 = total B, 3 " 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 garbage_collection_period = 50;
int opt; 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) { switch (opt) {
case 'V': case 'V':
versiondisplay(); versiondisplay();
@@ -153,7 +153,7 @@ int main(int argc, char **argv) {
case 'h': case 'h':
help(false); help(false);
exit(0); exit(0);
case 'b': case 'x':
bughuntmode = true; bughuntmode = true;
tracemode = true; tracemode = true;
break; break;