File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#include "syscall.h"
22
3- static securchk_result_t g_sec_result ;
4- static int g_sec_initialized = 0 ;
5-
63int syscall (int id , void * arg ) {
74 return syscall_handler (id , arg );
85}
@@ -25,26 +22,6 @@ int syscall_handler(int id, void* arg) {
2522 case SYSCALL_REBOOT :
2623 sys_next_status ("R" , 0 );
2724 return 0 ;
28-
29- case SYSCALL_SECURCHK_INIT :
30- securchk_init ();
31- g_sec_initialized = 1 ;
32- return 0 ;
33-
34- case SYSCALL_SECURCHK_RUN :
35- if (!g_sec_initialized ) securchk_init ();
36- if (arg )
37- securchk_run ((securchk_result_t * )arg );
38- else
39- securchk_run (& g_sec_result );
40- return 0 ;
41-
42- case SYSCALL_SECURCHK_STATUS :
43- if (!g_sec_initialized ) return -1 ;
44- if (arg )
45- * (securchk_result_t * )arg = g_sec_result ;
46- return securchk_get_overall_status (& g_sec_result );
47-
4825 default :
4926 return -1 ;
5027 }
Original file line number Diff line number Diff line change 11#ifndef SYSCALL_H
22#define SYSCALL_H
33
4- #include <OpenKernel/Drivers/Vga/vga.h>
5- #include <OpenKernel/Kernel/KernelServices/SystemManagement/sysmng.h>
6- #include <OpenKernel/Kernel/KernelServices/SecurityChecker/securchk.h>
4+ #include "syscall_extern.h"
75
86#define SYSCALL_PRINT 0
97#define SYSCALL_CLEAR_SCREEN 1
108#define SYSCALL_SHUTDOWN 2
119#define SYSCALL_REBOOT 3
12- #define SYSCALL_SECURCHK_INIT 4
13- #define SYSCALL_SECURCHK_RUN 5
14- #define SYSCALL_SECURCHK_STATUS 6
15- #define SYSCALL_MAX_ID 31
1610
1711int syscall (int id , void * arg );
1812int syscall_handler (int id , void * arg );
Original file line number Diff line number Diff line change 1+ #ifndef SYSCALL_EXTERN_H
2+ #define SYSCALL_EXTERN_H
3+
4+ extern void vga_print_scr (const char * str );
5+ extern void vga_clear_screen (const char * mode );
6+ extern void sys_next_status (const char * mode , uint32_t seconds );
7+
8+ #endif
You can’t perform that action at this time.
0 commit comments