MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / msh_get_cmd

Function msh_get_cmd

components/finsh/msh.c:231–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231static cmd_function_t msh_get_cmd(char *cmd, int size)
232{
233 struct finsh_syscall *index;
234 cmd_function_t cmd_func = RT_NULL;
235#if defined(FINSH_USING_SYMTAB)
236 for (index = _syscall_table_begin;
237 index < _syscall_table_end;
238 FINSH_NEXT_SYSCALL(index))
239 {
240 if (strncmp(index->name, cmd, size) == 0 &&
241 index->name[size] == '\0')
242 {
243 cmd_func = (cmd_function_t)index->func;
244 break;
245 }
246 }
247#endif /* FINSH_USING_SYMTAB */
248 return cmd_func;
249}
250
251#if defined(RT_USING_MODULE) && defined(DFS_USING_POSIX)
252/* Return 0 on module executed. Other value indicate error.

Callers 2

_msh_exec_cmdFunction · 0.85
msh_opt_auto_completeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected