File tree Expand file tree Collapse file tree 2 files changed +0
-30
lines changed Expand file tree Collapse file tree 2 files changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -357,35 +357,8 @@ int shell_set_root_cmd(const char *cmd)
357357 return 0 ;
358358}
359359
360- int shell_command_add (char * buff , uint16_t * buff_len ,
361- const char * new_cmd , const char * pattern )
362- {
363- uint16_t cmd_len = shell_strlen (new_cmd );
364- char * cmd_source_addr ;
365- uint16_t shift ;
366-
367- /* +1 for space */
368- if ((* buff_len + cmd_len + 1 ) > CONFIG_SHELL_CMD_BUFF_SIZE ) {
369- return - ENOMEM ;
370- }
371-
372- cmd_source_addr = strstr (buff , pattern );
373-
374- if (!cmd_source_addr ) {
375- return - EINVAL ;
376- }
377-
378- shift = shell_strlen (cmd_source_addr );
379360
380- /* make place for new command: + 1 for space + 1 for EOS */
381- memmove (cmd_source_addr + cmd_len + 1 , cmd_source_addr , shift + 1 );
382- memcpy (cmd_source_addr , new_cmd , cmd_len );
383- cmd_source_addr [cmd_len ] = ' ' ;
384361
385- * buff_len += cmd_len + 1 ; /* + 1 for space */
386-
387- return 0 ;
388- }
389362
390363void shell_spaces_trim (char * str )
391364{
Original file line number Diff line number Diff line change @@ -77,9 +77,6 @@ const struct shell_static_entry *shell_get_last_command(
7777 struct shell_static_entry * dloc ,
7878 bool only_static );
7979
80- int shell_command_add (char * buff , uint16_t * buff_len ,
81- const char * new_cmd , const char * pattern );
82-
8380const struct shell_static_entry * shell_root_cmd_find (const char * syntax );
8481
8582void shell_spaces_trim (char * str );
You can’t perform that action at this time.
0 commit comments