Skip to content

Commit 19251d2

Browse files
The “exec_command” function has been added to make it easier to run operating system shell commands.
1 parent 52a47b6 commit 19251d2

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

SystemLib/KernelFunc/kernel_func.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "kernel_func.h"
22

3-
#define MAX_FUNC 128
3+
#define MAX_FUNC 256
44

55
typedef struct {
66
const char *name;
@@ -26,4 +26,8 @@ void exec_func(const char *func_name) {
2626
return;
2727
}
2828
}
29+
}
30+
31+
void exec_command(const char *command_name) {
32+
exec_func(command_name);
2933
}

SystemLib/KernelFunc/kernel_func.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ void register_func(const char *name, kfunc_t func);
1717
Function Run
1818
*/
1919
void exec_func(const char *func_name);
20+
void exec_command(const char *command_name);
2021

2122
#define KERNEL_FUNC_MODULE_NAME "Kernel Func Library"
2223
#define KERNEL_FUNC_MODULE_DESC "Kernel Func Library for OpenKernel"

0 commit comments

Comments
 (0)