diff options
| author | Amlal EL Mahrouss <amlal@softwarelabs.com> | 2024-06-13 17:41:19 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlal@softwarelabs.com> | 2024-06-13 17:41:19 +0200 |
| commit | 349fe48baf941b2d1b571d3a5d0d796823bae312 (patch) | |
| tree | 6258abfbede227d0a7806530ccbf3cdf3ca3699c /DDK/KernelDev.c | |
| parent | 70ae21935c7c68ed8a380611481b553b94cee657 (diff) | |
MHR-31: New systemcall/kernelcall architecture.
Signed-off-by: Amlal EL Mahrouss <amlal@softwarelabs.com>
Diffstat (limited to 'DDK/KernelDev.c')
| -rw-r--r-- | DDK/KernelDev.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/DDK/KernelDev.c b/DDK/KernelDev.c index f19f85c6..6a6aac99 100644 --- a/DDK/KernelDev.c +++ b/DDK/KernelDev.c @@ -7,6 +7,7 @@ ------------------------------------------- */ #include <DDK/KernelDev.h> +#include <DDK/KernelString.h> /// @brief Open a new binary device from path. DK_EXTERN kernelDeviceRef kernelOpenBinaryDevice(const char* devicePath) @@ -14,7 +15,7 @@ DK_EXTERN kernelDeviceRef kernelOpenBinaryDevice(const char* devicePath) if (!devicePath) return NIL; - return kernelCall("OpenBinaryDevice", 1, devicePath); + return kernelCall("OpenBinaryDevice", 1, devicePath, kernelStringLength(devicePath)); } /// @brief Open a new character device from path. @@ -23,7 +24,7 @@ DK_EXTERN kernelDeviceRef kernelOpenCharDevice(const char* devicePath) if (!devicePath) return NIL; - return kernelCall("OpenCharDevice", 1, devicePath); + return kernelCall("OpenCharDevice", 1, devicePath, kernelStringLength(devicePath)); } /// @brief Close any device. @@ -33,5 +34,5 @@ DK_EXTERN void kernelCloseDevice(kernelDeviceRef device) if (!device) return; - kernelCall("CloseDevice", 1, device); + kernelCall("CloseDevice", 1, device, sizeof(kernelDevice)); } |
