shell: rename shell_help_print function
Function printing help has been renamed to shell_help. Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
parent
9e958b405c
commit
b928b71756
15 changed files with 51 additions and 51 deletions
|
@ -640,7 +640,7 @@ int shell_prompt_change(const struct shell *shell, char *prompt);
|
||||||
*
|
*
|
||||||
* @param[in] shell Pointer to the shell instance.
|
* @param[in] shell Pointer to the shell instance.
|
||||||
*/
|
*/
|
||||||
void shell_help_print(const struct shell *shell);
|
void shell_help(const struct shell *shell);
|
||||||
|
|
||||||
/** @brief Execute command.
|
/** @brief Execute command.
|
||||||
*
|
*
|
||||||
|
|
|
@ -232,7 +232,7 @@ static int cmd_flash(const struct shell *shell, size_t argc, char **argv)
|
||||||
ARG_UNUSED(argc);
|
ARG_UNUSED(argc);
|
||||||
ARG_UNUSED(argv);
|
ARG_UNUSED(argv);
|
||||||
|
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,7 @@ static int cmd_setip(const struct shell *shell, size_t argc, char *argv[])
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_NET_IPV6) && !IS_ENABLED(CONFIG_NET_IPV4)) {
|
if (IS_ENABLED(CONFIG_NET_IPV6) && !IS_ENABLED(CONFIG_NET_IPV4)) {
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ static int cmd_setip(const struct shell *shell, size_t argc, char *argv[])
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_NET_IPV4) && !IS_ENABLED(CONFIG_NET_IPV6)) {
|
if (IS_ENABLED(CONFIG_NET_IPV4) && !IS_ENABLED(CONFIG_NET_IPV6)) {
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ static int cmd_setip(const struct shell *shell, size_t argc, char *argv[])
|
||||||
if (IS_ENABLED(CONFIG_NET_IPV6) && IS_ENABLED(CONFIG_NET_IPV4)) {
|
if (IS_ENABLED(CONFIG_NET_IPV6) && IS_ENABLED(CONFIG_NET_IPV4)) {
|
||||||
if (net_addr_pton(AF_INET6, argv[start + 1], &ipv6) < 0) {
|
if (net_addr_pton(AF_INET6, argv[start + 1], &ipv6) < 0) {
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ static int cmd_setip(const struct shell *shell, size_t argc, char *argv[])
|
||||||
net_sprint_ipv4_addr(&ipv4));
|
net_sprint_ipv4_addr(&ipv4));
|
||||||
} else {
|
} else {
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -688,12 +688,12 @@ static int shell_cmd_upload(const struct shell *shell, size_t argc,
|
||||||
|
|
||||||
if (is_udp) {
|
if (is_udp) {
|
||||||
if (IS_ENABLED(CONFIG_NET_UDP)) {
|
if (IS_ENABLED(CONFIG_NET_UDP)) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_ENABLED(CONFIG_NET_TCP)) {
|
if (IS_ENABLED(CONFIG_NET_TCP)) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -828,12 +828,12 @@ static int shell_cmd_upload2(const struct shell *shell, size_t argc,
|
||||||
|
|
||||||
if (is_udp) {
|
if (is_udp) {
|
||||||
if (IS_ENABLED(CONFIG_NET_UDP)) {
|
if (IS_ENABLED(CONFIG_NET_UDP)) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (IS_ENABLED(CONFIG_NET_TCP)) {
|
if (IS_ENABLED(CONFIG_NET_TCP)) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -936,7 +936,7 @@ static int cmd_tcp(const struct shell *shell, size_t argc, char *argv[])
|
||||||
if (IS_ENABLED(CONFIG_NET_TCP)) {
|
if (IS_ENABLED(CONFIG_NET_TCP)) {
|
||||||
do_init(shell);
|
do_init(shell);
|
||||||
|
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -951,7 +951,7 @@ static int cmd_udp(const struct shell *shell, size_t argc, char *argv[])
|
||||||
if (IS_ENABLED(CONFIG_NET_UDP)) {
|
if (IS_ENABLED(CONFIG_NET_UDP)) {
|
||||||
do_init(shell);
|
do_init(shell);
|
||||||
|
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2031,7 +2031,7 @@ SHELL_CREATE_STATIC_SUBCMD_SET(mesh_cmds) {
|
||||||
static int cmd_mesh(const struct shell *shell, size_t argc, char **argv)
|
static int cmd_mesh(const struct shell *shell, size_t argc, char **argv)
|
||||||
{
|
{
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,7 @@ static int cmd_discovery(const struct shell *shell, size_t argc, char *argv[])
|
||||||
|
|
||||||
shell_print(shell, "Discovery stopped");
|
shell_print(shell, "Discovery stopped");
|
||||||
} else {
|
} else {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -296,7 +296,7 @@ static int cmd_discoverable(const struct shell *shell,
|
||||||
} else if (!strcmp(action, "off")) {
|
} else if (!strcmp(action, "off")) {
|
||||||
err = bt_br_set_discoverable(false);
|
err = bt_br_set_discoverable(false);
|
||||||
} else {
|
} else {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ static int cmd_connectable(const struct shell *shell,
|
||||||
} else if (!strcmp(action, "off")) {
|
} else if (!strcmp(action, "off")) {
|
||||||
err = bt_br_set_connectable(false);
|
err = bt_br_set_connectable(false);
|
||||||
} else {
|
} else {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -514,7 +514,7 @@ static int cmd_sdp_find_record(const struct shell *shell,
|
||||||
} else if (!strcmp(action, "A2SRC")) {
|
} else if (!strcmp(action, "A2SRC")) {
|
||||||
discov = discov_a2src;
|
discov = discov_a2src;
|
||||||
} else {
|
} else {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -551,7 +551,7 @@ SHELL_CREATE_STATIC_SUBCMD_SET(br_cmds) {
|
||||||
static int cmd_br(const struct shell *shell, size_t argc, char **argv)
|
static int cmd_br(const struct shell *shell, size_t argc, char **argv)
|
||||||
{
|
{
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -613,7 +613,7 @@ static int cmd_scan(const struct shell *shell, size_t argc, char *argv[])
|
||||||
} else if (!strcmp(dup_filter, "nodups")) {
|
} else if (!strcmp(dup_filter, "nodups")) {
|
||||||
dups = BT_HCI_LE_SCAN_FILTER_DUP_ENABLE;
|
dups = BT_HCI_LE_SCAN_FILTER_DUP_ENABLE;
|
||||||
} else {
|
} else {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -627,7 +627,7 @@ static int cmd_scan(const struct shell *shell, size_t argc, char *argv[])
|
||||||
} else if (!strcmp(action, "passive")) {
|
} else if (!strcmp(action, "passive")) {
|
||||||
return cmd_passive_scan_on(shell, dups);
|
return cmd_passive_scan_on(shell, dups);
|
||||||
} else {
|
} else {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -702,7 +702,7 @@ static int cmd_advertise(const struct shell *shell, size_t argc, char *argv[])
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -746,7 +746,7 @@ static int cmd_disconnect(const struct shell *shell, size_t argc, char *argv[])
|
||||||
bt_addr_le_t addr;
|
bt_addr_le_t addr;
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -795,7 +795,7 @@ static int cmd_auto_conn(const struct shell *shell, size_t argc, char *argv[])
|
||||||
} else if (!strcmp(argv[3], "off")) {
|
} else if (!strcmp(argv[3], "off")) {
|
||||||
return bt_le_set_auto_conn(&addr, NULL);
|
return bt_le_set_auto_conn(&addr, NULL);
|
||||||
} else {
|
} else {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -822,7 +822,7 @@ static int cmd_directed_adv(const struct shell *shell,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(argv[3], "low")) {
|
if (strcmp(argv[3], "low")) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1014,7 +1014,7 @@ static int cmd_bondable(const struct shell *shell, size_t argc, char *argv[])
|
||||||
} else if (!strcmp(bondable, "off")) {
|
} else if (!strcmp(bondable, "off")) {
|
||||||
bt_set_bondable(false);
|
bt_set_bondable(false);
|
||||||
} else {
|
} else {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1208,7 +1208,7 @@ static int cmd_auth(const struct shell *shell, size_t argc, char *argv[])
|
||||||
} else if (!strcmp(argv[1], "none")) {
|
} else if (!strcmp(argv[1], "none")) {
|
||||||
bt_conn_auth_cb_register(NULL);
|
bt_conn_auth_cb_register(NULL);
|
||||||
} else {
|
} else {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1389,7 +1389,7 @@ SHELL_CREATE_STATIC_SUBCMD_SET(bt_cmds) {
|
||||||
static int cmd_bt(const struct shell *shell, size_t argc, char **argv)
|
static int cmd_bt(const struct shell *shell, size_t argc, char **argv)
|
||||||
{
|
{
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -740,7 +740,7 @@ static int cmd_metrics(const struct shell *shell, size_t argc, char *argv[])
|
||||||
err = bt_gatt_service_unregister(&met_svc);
|
err = bt_gatt_service_unregister(&met_svc);
|
||||||
} else {
|
} else {
|
||||||
shell_error(shell, "Incorrect value: %s", argv[1]);
|
shell_error(shell, "Incorrect value: %s", argv[1]);
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -796,7 +796,7 @@ SHELL_CREATE_STATIC_SUBCMD_SET(gatt_cmds) {
|
||||||
static int cmd_gatt(const struct shell *shell, size_t argc, char **argv)
|
static int cmd_gatt(const struct shell *shell, size_t argc, char **argv)
|
||||||
{
|
{
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -354,7 +354,7 @@ static int cmd_metrics(const struct shell *shell, size_t argc, char *argv[])
|
||||||
} else if (!strcmp(action, "off")) {
|
} else if (!strcmp(action, "off")) {
|
||||||
l2cap_ops.recv = l2cap_recv;
|
l2cap_ops.recv = l2cap_recv;
|
||||||
} else {
|
} else {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ SHELL_CREATE_STATIC_SUBCMD_SET(l2cap_cmds) {
|
||||||
static int cmd_l2cap(const struct shell *shell, size_t argc, char **argv)
|
static int cmd_l2cap(const struct shell *shell, size_t argc, char **argv)
|
||||||
{
|
{
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,7 +244,7 @@ SHELL_CREATE_STATIC_SUBCMD_SET(rfcomm_cmds) {
|
||||||
static int cmd_rfcomm(const struct shell *shell, size_t argc, char **argv)
|
static int cmd_rfcomm(const struct shell *shell, size_t argc, char **argv)
|
||||||
{
|
{
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ SHELL_CREATE_STATIC_SUBCMD_SET(ticker_cmds) {
|
||||||
static int cmd_ticker(const struct shell *shell, size_t argc, char **argv)
|
static int cmd_ticker(const struct shell *shell, size_t argc, char **argv)
|
||||||
{
|
{
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* shell returns 1 when help is printed */
|
/* shell returns 1 when help is printed */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ static int shell_cmd_connect(const struct shell *shell,
|
||||||
struct net_if *iface = net_if_get_default();
|
struct net_if *iface = net_if_get_default();
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ static int shell_cmd_scan(const struct shell *shell,
|
||||||
struct net_if *iface = net_if_get_default();
|
struct net_if *iface = net_if_get_default();
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ static int shell_cmd_advertise(const struct shell *shell,
|
||||||
struct net_if *iface = net_if_get_default();
|
struct net_if *iface = net_if_get_default();
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ static int cmd_ieee802154_associate(const struct shell *shell,
|
||||||
char ext_addr[MAX_EXT_ADDR_STR_LEN];
|
char ext_addr[MAX_EXT_ADDR_STR_LEN];
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ static int cmd_ieee802154_scan(const struct shell *shell,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ static int cmd_ieee802154_set_chan(const struct shell *shell,
|
||||||
u16_t channel;
|
u16_t channel;
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ static int cmd_ieee802154_set_pan_id(const struct shell *shell,
|
||||||
ARG_UNUSED(argc);
|
ARG_UNUSED(argc);
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -405,7 +405,7 @@ static int cmd_ieee802154_set_ext_addr(const struct shell *shell,
|
||||||
u8_t addr[IEEE802154_EXT_ADDR_LENGTH];
|
u8_t addr[IEEE802154_EXT_ADDR_LENGTH];
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ static int cmd_ieee802154_set_short_addr(const struct shell *shell,
|
||||||
u16_t short_addr;
|
u16_t short_addr;
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -539,7 +539,7 @@ static int cmd_ieee802154_set_tx_power(const struct shell *shell,
|
||||||
s16_t tx_power;
|
s16_t tx_power;
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,13 +152,13 @@ static int cmd_wifi_connect(const struct shell *shell, size_t argc,
|
||||||
int idx = 3;
|
int idx = 3;
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
cnx_params.ssid_length = strtol(argv[2], &endptr, 10);
|
cnx_params.ssid_length = strtol(argv[2], &endptr, 10);
|
||||||
if (*endptr != '\0' || cnx_params.ssid_length <= 2) {
|
if (*endptr != '\0' || cnx_params.ssid_length <= 2) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ static int cmd_wifi_connect(const struct shell *shell, size_t argc,
|
||||||
if ((idx < argc) && (strlen(argv[idx]) <= 2)) {
|
if ((idx < argc) && (strlen(argv[idx]) <= 2)) {
|
||||||
cnx_params.channel = strtol(argv[idx], &endptr, 10);
|
cnx_params.channel = strtol(argv[idx], &endptr, 10);
|
||||||
if (*endptr != '\0') {
|
if (*endptr != '\0') {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ static int shell_cmd_precheck(const struct shell *shell,
|
||||||
shell->ctx->active_cmd.syntax);
|
shell->ctx->active_cmd.syntax);
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_SHELL_HELP_ON_WRONG_ARGUMENT_COUNT)) {
|
if (IS_ENABLED(CONFIG_SHELL_HELP_ON_WRONG_ARGUMENT_COUNT)) {
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
}
|
}
|
||||||
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -882,7 +882,7 @@ static int exec_cmd(const struct shell *shell, size_t argc, char **argv,
|
||||||
if (help_entry.help != shell->ctx->active_cmd.help) {
|
if (help_entry.help != shell->ctx->active_cmd.help) {
|
||||||
shell->ctx->active_cmd = help_entry;
|
shell->ctx->active_cmd = help_entry;
|
||||||
}
|
}
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
/* 1 is return value when shell prints help */
|
/* 1 is return value when shell prints help */
|
||||||
ret_val = 1;
|
ret_val = 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1001,7 +1001,7 @@ static int shell_execute(const struct shell *shell)
|
||||||
*/
|
*/
|
||||||
if (help_entry.help) {
|
if (help_entry.help) {
|
||||||
shell->ctx->active_cmd = help_entry;
|
shell->ctx->active_cmd = help_entry;
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1434,7 +1434,7 @@ int shell_prompt_change(const struct shell *shell, char *prompt)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void shell_help_print(const struct shell *shell)
|
void shell_help(const struct shell *shell)
|
||||||
{
|
{
|
||||||
__ASSERT_NO_MSG(shell);
|
__ASSERT_NO_MSG(shell);
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ static int cmd_hrs_simulate(const struct shell *shell,
|
||||||
hrs_simulate = false;
|
hrs_simulate = false;
|
||||||
} else {
|
} else {
|
||||||
shell_print(shell, "Incorrect value: %s", argv[1]);
|
shell_print(shell, "Incorrect value: %s", argv[1]);
|
||||||
shell_help_print(shell);
|
shell_help(shell);
|
||||||
return -ENOEXEC;
|
return -ENOEXEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue