diff --git a/script/check-posix-pty b/script/check-posix-pty index 94aa1782e..8cfcc6b54 100755 --- a/script/check-posix-pty +++ b/script/check-posix-pty @@ -124,6 +124,9 @@ do_check() OT_CTL="$PWD/build/posix/src/posix/ot-ctl" sudo "${OT_CTL}" -I "${NETIF_NAME}" panid 0xface | grep 'Done' || die 'failed to set panid with ot-ctl' + # verify supports options in OpenThread commands without separator -- + sudo "${OT_CTL}" -I "${NETIF_NAME}" pskc -p 123456 | grep 'Done' || die 'unable to set pskc' + # verify this reset and factoryreset end immediately sudo "${OT_CTL}" -I "${NETIF_NAME}" reset # sleep a while for daemon ready diff --git a/src/posix/client.cpp b/src/posix/client.cpp index a80a5f4b4..2a3940fdf 100644 --- a/src/posix/client.cpp +++ b/src/posix/client.cpp @@ -208,7 +208,7 @@ Config ParseArg(int &aArgCount, char **&aArgVector) optind = 1; - for (int index, option; (option = getopt_long(aArgCount, aArgVector, "I:h", kOptions, &index)) != -1;) + for (int index, option; (option = getopt_long(aArgCount, aArgVector, "+I:h", kOptions, &index)) != -1;) { switch (option) {