summaryrefslogtreecommitdiffhomepage
path: root/dev/libDDK/src
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-10-26 16:01:12 +0100
committerGitHub <noreply@github.com>2025-10-26 16:01:12 +0100
commit36269e57831e560df6a0da9c9d02c00671b0163d (patch)
tree69f6a0c6f08ef5ef2f6fcbb7302537dbce222e6e /dev/libDDK/src
parent2117a9b0f4b84f5bd6c99566bcf5849a64104467 (diff)
parentb6ce6640afaf6c1cc6ad274f3053b2e218a49554 (diff)
Merge pull request #68 from nekernel-org/dev
NeKernel: v0.0.6e1
Diffstat (limited to 'dev/libDDK/src')
-rw-r--r--dev/libDDK/src/ddk_dev.c6
-rw-r--r--dev/libDDK/src/ddk_io.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/dev/libDDK/src/ddk_dev.c b/dev/libDDK/src/ddk_dev.c
index d20684aa..c0396eb5 100644
--- a/dev/libDDK/src/ddk_dev.c
+++ b/dev/libDDK/src/ddk_dev.c
@@ -10,15 +10,15 @@
#include <DriverKit/str.h>
/// @brief Open a new binary device from path.
-DDK_EXTERN DDK_DEVICE_PTR open(const char* devicePath) {
+DDK_EXTERN DDK_DEVICE_PTR kopen_dev(const char* devicePath) {
if (nil == devicePath) return nil;
- return ke_call_dispatch("dk_open_dev", 1, (void*) devicePath, kstrlen(devicePath));
+ return (DDK_DEVICE_PTR)ke_call_dispatch("dk_open_dev", 1, (void*) devicePath, kstrlen(devicePath));
}
/// @brief Close any device.
/// @param device valid device.
-DDK_EXTERN BOOL close(DDK_DEVICE_PTR device) {
+DDK_EXTERN BOOL kclose_dev(DDK_DEVICE_PTR device) {
if (nil == device) return NO;
ke_call_dispatch("dk_close_dev", 1, device, sizeof(DDK_DEVICE));
diff --git a/dev/libDDK/src/ddk_io.c b/dev/libDDK/src/ddk_io.c
index 825e82a7..ab0dd624 100644
--- a/dev/libDDK/src/ddk_io.c
+++ b/dev/libDDK/src/ddk_io.c
@@ -1,6 +1,6 @@
/* -------------------------------------------
- libDDK.
+ libDDK - Device Driver Kit
Copyright 2025 - Amlal El Mahrouss and NeKernel contributors.
File: ddk_io.c
@@ -24,7 +24,7 @@ DDK_EXTERN void kputc(const char ch) {
/// @param message UART to transmit.
DDK_EXTERN void kprint(const char* message) {
if (nil == message) return;
- if (*message == 0) return;
+ if (*message == '\0') return;
size_t index = 0;
size_t len = kstrlen(message);