17 lines
284 B
C
17 lines
284 B
C
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <sys/ksys.h>
|
|
|
|
int system(const char* command)
|
|
{
|
|
if (command == NULL || *command == '\0')
|
|
return 1;
|
|
|
|
int ret = _ksys_exec("/sys/SHELL", (char*)command);
|
|
|
|
if (ret > 0)
|
|
return 0;
|
|
else
|
|
return ret;
|
|
}
|