summaryrefslogtreecommitdiffhomepage
path: root/DDK/KernelDev.c
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-06-19 07:59:04 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-06-19 07:59:04 +0000
commitb820eb6a5a7948597d81998137b05ddc0eb0dbad (patch)
treedb4eaea0b6863076c4f1476f361e2317823a663a /DDK/KernelDev.c
parent36ff25861676cd1f5fb94b901fa59b015c614bc5 (diff)
parent6735570c44516661260546dadb81f0f5c238d1db (diff)
Merged in MHR-31 (pull request #16)
MHR-31: Round robin scheduler.
Diffstat (limited to 'DDK/KernelDev.c')
-rw-r--r--DDK/KernelDev.c7
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));
}