summaryrefslogtreecommitdiff
path: root/src/tools/irm/irm_ipcp_connect.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-08-29 18:37:58 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2017-08-29 18:47:37 +0200
commite533ca60b841193fbdb7d135de3d9e56916445c2 (patch)
tree3cdb94c5fd0753e3c440497fcc9cab5e5d09db45 /src/tools/irm/irm_ipcp_connect.c
parent7d598d4a706e06e7e89218ca9ae071dd630cb2b3 (diff)
downloadouroboros-e533ca60b841193fbdb7d135de3d9e56916445c2.tar.gz
ouroboros-e533ca60b841193fbdb7d135de3d9e56916445c2.zip
tools: irm: Fix matching of name parameter
The name parameter was not being matched correctly in ipcp connect and disconnect.
Diffstat (limited to 'src/tools/irm/irm_ipcp_connect.c')
-rw-r--r--src/tools/irm/irm_ipcp_connect.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/irm/irm_ipcp_connect.c b/src/tools/irm/irm_ipcp_connect.c
index 168c8d17..3f52e6f8 100644
--- a/src/tools/irm/irm_ipcp_connect.c
+++ b/src/tools/irm/irm_ipcp_connect.c
@@ -35,10 +35,10 @@
static void usage(void)
{
printf("Usage: irm ipcp connect\n"
- " name <ipcp name>\n"
- " comp <COMPONENT>\n"
- " dst <name of destination IPCP>\n"
- "where COMPONENT = {" DT " " MGMT "},\n\n");
+ " name <ipcp name>\n"
+ " component [COMPONENT]\n"
+ " dst <name of destination IPCP>\n\n"
+ "where COMPONENT = {" DT " " MGMT "}\n");
}
int do_connect_ipcp(int argc,
@@ -51,11 +51,11 @@ int do_connect_ipcp(int argc,
ssize_t len = 0;
while (argc > 0) {
- if (strcmp(*argv, "name") == 0) {
+ if (matches(*argv, "name") == 0) {
name = *(argv + 1);
} else if (matches(*argv, "dst") == 0) {
dst_name = *(argv + 1);
- } else if (matches(*argv, "comp") == 0) {
+ } else if (matches(*argv, "component") == 0) {
comp_name = *(argv + 1);
} else {
printf("\"%s\" is unknown, try \"irm "