Skip to content

Commit 61e1f85

Browse files
committed
fixup! sys/shell: integrate OpenThread CLI into RIOT shell
1 parent 07a0125 commit 61e1f85

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sys/shell/cmds/openthread.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,19 @@ static int ot_console_cb(const char *abuf, uint16_t bufsize, void *context)
3131

3232
static int ot_cmd(int argc, char **argv)
3333
{
34+
/* Join all arguments after "ot" into a single space-separated string */
3435
for (int i = 1; i < argc - 1; i++) {
3536
char *arg = argv[i];
3637
arg += strlen(arg);
3738
*arg = ' ';
3839
}
3940

40-
if (strlen(argv[0]) != 0) {
41+
if (strlen(argv[1]) != 0) {
4142
otCliConsoleInputLine(argv[1], strlen(argv[1]));
4243
}
44+
else {
45+
otCliConsoleInputLine("help", strlen("help"));
46+
}
4347
return 0;
4448
}
4549

0 commit comments

Comments
 (0)