remove service prefix from options, add helptext for services
authorFelix Fietkau <nbd@openwrt.org>
Sun, 17 Feb 2013 14:03:39 +0000 (15:03 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 17 Feb 2013 14:03:39 +0000 (15:03 +0100)
commands-dms.h
commands-wds.h
main.c

index af661bce22adcc64f227f7852fe85b3a2b3cf4b5..14949cf9503d619ecea7e9d444fab96911dc893e 100644 (file)
@@ -1,5 +1,10 @@
 #define __uqmi_dms_commands \
-       __uqmi_command(dms_get_pin_status, dms-get-pin-status, no, QMI_SERVICE_DMS), \
-       __uqmi_command(dms_verify_pin1, dms-verify-pin1, required, QMI_SERVICE_DMS), \
-       __uqmi_command(dms_verify_pin2, dms-verify-pin2, required, QMI_SERVICE_DMS) \
+       __uqmi_command(dms_get_pin_status, get-pin-status, no, QMI_SERVICE_DMS), \
+       __uqmi_command(dms_verify_pin1, verify-pin1, required, QMI_SERVICE_DMS), \
+       __uqmi_command(dms_verify_pin2, verify-pin2, required, QMI_SERVICE_DMS) \
+
+#define dms_helptext \
+               "  --get-pin-status:                 Get PIN verification status\n" \
+               "  --verify-pin1:                    Verify PIN1\n" \
+               "  --verify-pin2:                    Verify PIN2\n" \
 
index 3690c3f50591e280f810865de731df78eae762e7..2374f853261908facef293c7a93fe5a4bb81c69e 100644 (file)
@@ -1,5 +1,10 @@
 #define __uqmi_wds_commands \
-       __uqmi_command(wds_set_auth, wds-set-auth, required, QMI_SERVICE_WDS), \
-       __uqmi_command(wds_set_username, wds-set-username, required, QMI_SERVICE_WDS), \
-       __uqmi_command(wds_set_password, wds-set-password, required, QMI_SERVICE_WDS)
+       __uqmi_command(wds_set_auth, set-auth, required, QMI_SERVICE_WDS), \
+       __uqmi_command(wds_set_username, set-username, required, QMI_SERVICE_WDS), \
+       __uqmi_command(wds_set_password, set-password, required, QMI_SERVICE_WDS)
+
+#define wds_helptext \
+               "  --set-auth pap|chap|both|none:    Set network authentication type\n" \
+               "  --set-username:                   Set network username\n" \
+               "  --set-password:                   Set network password\n" \
 
diff --git a/main.c b/main.c
index 47e0ff2084883f85bc661af871b215d670f7fde9..5605da21a0e535874db51d6fbce6c1a78e3fdb71 100644 (file)
--- a/main.c
+++ b/main.c
@@ -38,6 +38,8 @@ static int usage(const char *progname)
                "  --set-client-id <name>,<id>:      Set Client ID for service <name> to <id>\n"
                "  --get-client-id <name>:           Connect and get Client ID for service <name>\n"
                "                                    (implies --keep-client-id)\n"
+               wds_helptext
+               dms_helptext
                "\n", progname);
        return 1;
 }