MT#61856 control_ng: preserve support of "CLI"

Previous approach based on the strhash used
to support an upper case variant of "cli" command.
Just preserve it.

Current NG_COMMANDS based macro generation, uses
only lower cases based on the command name from
the table, so not mess things more, just add
one exception for the "CLI".

Change-Id: I0bb373a50f56a44c13921a24fddf9534379b8e0d
mr26.1
Donat Zenichev 2 weeks ago
parent c9248e4fe6
commit 67ab631168

@ -73,6 +73,10 @@ static const struct ng_command_def *ng_command_find(const str *cmd) {
#undef XA
#undef X
/* Preserve behaviour: both "cli" and "CLI" must be supported */
if (cmd->len == sizeof("CLI") - 1 && !memcmp(cmd->s, "CLI", sizeof("CLI") - 1))
return &ng_command_defs[OP_CLI];
return NULL;
}

Loading…
Cancel
Save