Skip to content

Commit 970714c

Browse files
Update mctp help to be consistent with the use of IFNAME
The help information for the mctp tool alternated between using <dev> and <IFNAME> when describing interface names. Switch to use <ifname>, which should be more helpful than `dev <dev>` and matches the case conventions of the other options. Update README.md to reflect the changes and add `mctp monitor` to the end, which had been ommitted. Signed-off-by: James Lee <james@codeconstruct.com.au>
1 parent 072b9c6 commit 970714c

2 files changed

Lines changed: 17 additions & 14 deletions

File tree

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,26 @@ Use `mctp help` for the list of available commands:
4444
mctp link
4545
mctp link show [ifname]
4646
mctp link set <ifname> [up|down] [mtu <mtu>] [network <net>] [bus-owner <physaddr>]
47+
mctp link serial <device>
4748

4849
mctp address
49-
mctp address show [IFNAME]
50-
mctp address add <eid> dev <IFNAME>
51-
mctp address del <eid> dev <IFNAME>
50+
mctp address show [ifname]
51+
mctp address add <eid> dev <ifname>
52+
mctp address del <eid> dev <ifname>
5253

5354
mctp route
5455
mctp route show [net <network>]
55-
mctp route add <eid>[-<eid>] via <dev> [mtu <mtu>]
56+
mctp route add <eid>[-<eid>] via <ifname> [mtu <mtu>]
5657
mctp route add <eid>[-<eid>] gw <eid> [net <net>] [mtu <mtu>]
57-
mctp route del <eid>[-<eid>] via <dev>
58+
mctp route del <eid>[-<eid>] via <ifname>
5859
mctp route del <eid>[-<eid>] gw <eid> [net <net>]
5960

6061
mctp neigh
6162
mctp neigh show [dev <network>]
62-
mctp neigh add <eid> dev <device> lladdr <physaddr>
63-
mctp neigh del <eid> dev <device>
63+
mctp neigh add <eid> dev <ifname> lladdr <physaddr>
64+
mctp neigh del <eid> dev <ifname>
65+
66+
mctp monitor
6467

6568
`mctpd` Usage
6669
-------------

src/mctp.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -895,10 +895,10 @@ static int cmd_addr(struct ctx *ctx, int argc, const char **argv)
895895
const char *subcmd;
896896
if (argc == 2 && !strcmp(argv[1], "help")) {
897897
fprintf(stderr, "%s address\n", ctx->top_cmd);
898-
fprintf(stderr, "%s address show [IFNAME]\n", ctx->top_cmd);
899-
fprintf(stderr, "%s address add <eid> dev <IFNAME>\n",
898+
fprintf(stderr, "%s address show [ifname]\n", ctx->top_cmd);
899+
fprintf(stderr, "%s address add <eid> dev <ifname>\n",
900900
ctx->top_cmd);
901-
fprintf(stderr, "%s address del <eid> dev <IFNAME>\n",
901+
fprintf(stderr, "%s address del <eid> dev <ifname>\n",
902902
ctx->top_cmd);
903903
return 255;
904904
}
@@ -1126,12 +1126,12 @@ static int cmd_route(struct ctx *ctx, int argc, const char **argv)
11261126
fprintf(stderr, "%s route show [net <network>]\n",
11271127
ctx->top_cmd);
11281128
fprintf(stderr,
1129-
"%s route add <eid>[-<eid>] via <dev> [mtu <mtu>]\n",
1129+
"%s route add <eid>[-<eid>] via <ifname> [mtu <mtu>]\n",
11301130
ctx->top_cmd);
11311131
fprintf(stderr,
11321132
"%s route add <eid>[-<eid>] gw <eid> [net <net>] [mtu <mtu>]\n",
11331133
ctx->top_cmd);
1134-
fprintf(stderr, "%s route del <eid>[-<eid>] via <dev>\n",
1134+
fprintf(stderr, "%s route del <eid>[-<eid>] via <ifname>\n",
11351135
ctx->top_cmd);
11361136
fprintf(stderr,
11371137
"%s route del <eid>[-<eid>] gw <eid> [net <net>]\n",
@@ -1336,11 +1336,11 @@ static int cmd_neigh(struct ctx *ctx, int argc, const char **argv)
13361336
fprintf(stderr, "%s neigh show [dev <network>]\n",
13371337
ctx->top_cmd);
13381338
fprintf(stderr,
1339-
"%s neigh add <eid> dev <device> lladdr <physaddr>\n",
1339+
"%s neigh add <eid> dev <ifname> lladdr <physaddr>\n",
13401340
ctx->top_cmd);
13411341
fprintf(stderr,
13421342
" <physaddr> syntax is for example \"1d\" or \"aa:bb:cc:11:22:33\"\n");
1343-
fprintf(stderr, "%s neigh del <eid> dev <device>\n",
1343+
fprintf(stderr, "%s neigh del <eid> dev <ifname>\n",
13441344
ctx->top_cmd);
13451345
return 255;
13461346
}

0 commit comments

Comments
 (0)