From caa49e901b697aea2133f4a05b9dd2c2795a4cbc Mon Sep 17 00:00:00 2001 From: turbocat Date: Thu, 29 Apr 2021 18:42:25 +0000 Subject: [PATCH] kolibri-libc: - Added function _ksys_load_pe_driver() git-svn-id: svn://kolibrios.org@8702 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../libraries/kolibri-libc/include/sys/ksys.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/programs/develop/libraries/kolibri-libc/include/sys/ksys.h b/programs/develop/libraries/kolibri-libc/include/sys/ksys.h index 7a9293cbbd..2e79619179 100644 --- a/programs/develop/libraries/kolibri-libc/include/sys/ksys.h +++ b/programs/develop/libraries/kolibri-libc/include/sys/ksys.h @@ -143,7 +143,7 @@ typedef struct { void* func_ptr; }ksys_coff_etable_t; -typedef void* ksys_drv_hand_t; +typedef unsigned ksys_drv_hand_t; typedef struct{ ksys_drv_hand_t handler; @@ -1015,6 +1015,17 @@ ksys_drv_hand_t _ksys_load_driver(char *driver_name) return driver_h; } +ksys_drv_hand_t _ksys_load_pe_driver(char *driver_path, char *cmd_line) +{ + ksys_drv_hand_t driver_h; + asm_inline( + "int $0x40" + :"=a"(driver_h) + :"a"(68), "b"(21), "c"(driver_path), "d"(cmd_line) + ); + return driver_h; +} + static inline unsigned _ksys_work_driver(ksys_drv_ctl_t *ioctl) {