* @brief Execute a command using the Micro-Shell (MSH) subsystem. * * @param command is the command string to execute. * * @return Returns 0 after executing the command. */
| 50 | * @return Returns 0 after executing the command. |
| 51 | */ |
| 52 | int system(const char *command) |
| 53 | { |
| 54 | extern int msh_exec(char *cmd, rt_size_t length); |
| 55 | |
| 56 | if (command) |
| 57 | { |
| 58 | msh_exec((char *)command, rt_strlen(command)); |
| 59 | } |
| 60 | |
| 61 | return 0; |
| 62 | } |
| 63 | RTM_EXPORT(system); |
| 64 | #endif /* RT_USING_MSH */ |
| 65 |