Author: marek
Date: 2010-01-07 15:08:38 +0100 (Thu, 07 Jan 2010)
New Revision: 1539
Modified:
branches/batctl-0.2.x/man/batctl.8
branches/batctl-0.2.x/vis.c
Log:
batctl: VIS subcommand uses -h for help/usage.
Signed-off-by: Andrew Lunn <andrew(a)lunn.ch>
Modified: branches/batctl-0.2.x/man/batctl.8
===================================================================
--- branches/batctl-0.2.x/man/batctl.8 2010-01-07 14:08:34 UTC (rev 1538)
+++ branches/batctl-0.2.x/man/batctl.8 2010-01-07 14:08:38 UTC (rev 1539)
@@ -99,18 +99,18 @@
displayed only once (useful for scripts). If "\-n" is given batctl
will not replace the MAC addresses with bat\-host names in the output.
.br
-.IP "\fBvis dot\fP
[\fB\-n\fP|\fB\-\-numbers\fP][\fB\-h\fP|\fB\-\-no-HNA\fP][\fB\-2\fP|\fB\-\-no-2nd\fP]"
+.IP "\fBvis dot\fP
[\fB\-n\fP|\fB\-\-numbers\fP][\fB\-H\fP|\fB\-\-no-HNA\fP][\fB\-2\fP|\fB\-\-no-2nd\fP]"
Display the visualisation data in graphviz \fBdot\fP(1) format. If
"\-\-numbers" or "\-n" is given batctl will not replace the MAC
addresses with bat-host names in the output. With "\-\-no-HNA" or
-"\-h" the HNA entries are not displayed, so the pure mesh topology can
+"\-H" the HNA entries are not displayed, so the pure mesh topology can
be seen. With "\-\-no-2nd" or "\-2" a dot cluster is not formed
around
primary and secondary addresses from the same device.
.br
-.IP "\fBvis json\fP
[\fB\-n\fP|\fB\-\-numbers\fP][\fB\-h\fP|\fB\-\-no-HNA\fP][\fB\-2\fP|\fB\-\-no-2nd\fP]"
+.IP "\fBvis json\fP
[\fB\-n\fP|\fB\-\-numbers\fP][\fB\-H\fP|\fB\-\-no-HNA\fP][\fB\-2\fP|\fB\-\-no-2nd\fP]"
Display the visualisation data in JSON format. If "\-\-numbers" or
"\-n" is given batctl will not replace the MAC addresses with bat-host
-names in the output. With "\-\-no-HNA" or "\-h" the HNA entries are
+names in the output. With "\-\-no-HNA" or "\-H" the HNA entries are
not displayed, so the pure mesh topology can be seen. With
"\-\-no-2nd" or "\-2" a dot cluster is not formed around primary and
secondary addresses from the same device.
Modified: branches/batctl-0.2.x/vis.c
===================================================================
--- branches/batctl-0.2.x/vis.c 2010-01-07 14:08:34 UTC (rev 1538)
+++ branches/batctl-0.2.x/vis.c 2010-01-07 14:08:38 UTC (rev 1539)
@@ -55,9 +55,9 @@
static void usage(void)
{
- printf("batctl vis dot {--no-HNA|-h} {--no-2nd|-2} {--numbers|-n}\n");
+ printf("batctl vis dot {-h}{--no-HNA|-H} {--no-2nd|-2} {--numbers|-n}\n");
printf("or\n");
- printf("batctl vis json {--no-HNA|-h} {--no-2nd|-2} {--numbers|-n}\n");
+ printf("batctl vis json {-h}{--no-HNA|-H} {--no-2nd|-2} {--numbers|-n}\n");
}
static void dot_print_tq(char *orig, char *from, const long tq)
@@ -271,18 +271,18 @@
while (1) {
int option_index = 0;
static struct option long_options[] = {
- {"no-HNA", 0, 0, 'h'},
+ {"no-HNA", 0, 0, 'H'},
{"no-2nd", 0, 0, '2'},
{"numbers", 0, 0, 'n'},
{0, 0, 0, 0}
};
- c = getopt_long(argc, argv, "h2n", long_options, &option_index);
+ c = getopt_long(argc, argv, "hH2n", long_options, &option_index);
if (c == -1)
break;
switch (c) {
- case 'h':
+ case 'H':
with_HNA = false;
break;
case '2':
@@ -291,6 +291,7 @@
case 'n':
with_names = false;
break;
+ case 'h':
default:
usage();
return -1;
Show replies by date