X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fmware%2Fparser.c;h=71aec30dc980f58d1c4b1ada8060224c96878e7c;hb=a2b62bd610858d31a552236c97a4e1a630940756;hp=5bfba1c1a3fe7b00cc8100300b971851e17762c9;hpb=9781d857a099bb35f129689806386a7f4de763ce;p=bertos.git diff --git a/bertos/mware/parser.c b/bertos/mware/parser.c index 5bfba1c1..71aec30d 100644 --- a/bertos/mware/parser.c +++ b/bertos/mware/parser.c @@ -55,6 +55,8 @@ #include "parser.h" +#include "cfg/cfg_parser.h" + #include #include @@ -307,10 +309,11 @@ bool parser_process_line(const char* input) * Register a new command into the parser * * \param cmd Command template describing the command + * \return true if registration was successful, false otherwise */ -void parser_register_cmd(const struct CmdTemplate* cmd) +bool parser_register_cmd(const struct CmdTemplate* cmd) { - ht_insert(&commands, cmd); + return ht_insert(&commands, cmd); } void parser_init(void)