shell: kernel: fix sleep command

Was trying to parse the second argument instead of the first one.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This commit is contained in:
Jonathan Rico 2022-08-03 08:29:18 +02:00 committed by Carles Cufí
commit 1d0692b2f7

View file

@ -231,7 +231,7 @@ static int cmd_kernel_sleep(const struct shell *sh,
uint32_t ms;
int err = 0;
ms = shell_strtoul(argv[2], 10, &err);
ms = shell_strtoul(argv[1], 10, &err);
if (!err) {
k_msleep(ms);