diff options
| author | Amlal <amlal@nekernel.org> | 2025-04-25 13:08:33 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-04-25 13:08:33 +0200 |
| commit | fb790b07aeba8e22e4190cf3e1834d11ecde6c96 (patch) | |
| tree | 4cec7d1b321307b1d5935577631dae116a658a37 /dev/ddk/DDKKit | |
| parent | 63a2d92c5dfe976175cda024ec01905d11b43738 (diff) | |
dev: better .clang-format, ran format command.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/ddk/DDKKit')
| -rw-r--r-- | dev/ddk/DDKKit/ddk.h | 52 | ||||
| -rw-r--r-- | dev/ddk/DDKKit/dev.h | 21 | ||||
| -rw-r--r-- | dev/ddk/DDKKit/io.h | 4 | ||||
| -rw-r--r-- | dev/ddk/DDKKit/str.h | 6 |
4 files changed, 40 insertions, 43 deletions
diff --git a/dev/ddk/DDKKit/ddk.h b/dev/ddk/DDKKit/ddk.h index 04d067ae..b7bcd52c 100644 --- a/dev/ddk/DDKKit/ddk.h +++ b/dev/ddk/DDKKit/ddk.h @@ -1,36 +1,36 @@ /* ------------------------------------------- - Copyright Amlal El Mahrouss. + Copyright Amlal El Mahrouss. - FILE: ddk.h - PURPOSE: DDK Driver model base header. + FILE: ddk.h + PURPOSE: DDK Driver model base header. ------------------------------------------- */ #pragma once -#include <stdint.h> #include <stddef.h> +#include <stdint.h> #if defined(__cplusplus) -#define BOOL bool -#define YES true -#define NO false +#define BOOL bool +#define YES true +#define NO false #define DDK_EXTERN extern "C" __declspec(dllexport) -#define nil nullptr +#define nil nullptr #undef NULL -#define NULL 0 +#define NULL 0 #define DDK_FINAL final #else -#define BOOL char -#define YES 1 -#define NO 0 +#define BOOL char +#define YES 1 +#define NO 0 #define DDK_EXTERN extern __declspec(dllexport) -#define nil ((void*)0) +#define nil ((void*) 0) #undef NULL -#define NULL ((void*)0) +#define NULL ((void*) 0) #define DDK_FINAL -#endif // defined(__cplusplus) +#endif // defined(__cplusplus) #ifndef __DDK__ #undef DDK_EXTERN @@ -45,26 +45,24 @@ #ifndef __NEOSKRNL__ #error !!! Do not include header in EL0/Ring 3 mode !!! -#endif // __MINOSKRNL__ +#endif // __MINOSKRNL__ struct DDK_STATUS_STRUCT; struct DDK_OBJECT_MANIFEST; /// \brief Object handle manifest. -struct DDK_OBJECT_MANIFEST DDK_FINAL -{ - char* p_name; - int32_t p_kind; - void* p_object; +struct DDK_OBJECT_MANIFEST DDK_FINAL { + char* p_name; + int32_t p_kind; + void* p_object; }; /// \brief DDK status ping structure. -struct DDK_STATUS_STRUCT DDK_FINAL -{ - int32_t s_action_id; - int32_t s_issuer_id; - int32_t s_group_id; - void* s_object; +struct DDK_STATUS_STRUCT DDK_FINAL { + int32_t s_action_id; + int32_t s_issuer_id; + int32_t s_group_id; + void* s_object; }; /// @brief Call Kernel procedure. diff --git a/dev/ddk/DDKKit/dev.h b/dev/ddk/DDKKit/dev.h index 80cb77c9..6c8a828e 100644 --- a/dev/ddk/DDKKit/dev.h +++ b/dev/ddk/DDKKit/dev.h @@ -1,9 +1,9 @@ /* ------------------------------------------- - Copyright Amlal El Mahrouss. + Copyright Amlal El Mahrouss. - File: dev.h - Purpose: DDK device support. + File: dev.h + Purpose: DDK device support. ------------------------------------------- */ @@ -16,14 +16,13 @@ struct _DDK_DEVICE; #define DDK_DEVICE_NAME_LEN (255) /// @brief Kernel Device driver. -typedef struct _DDK_DEVICE DDK_FINAL -{ - char d_name[DDK_DEVICE_NAME_LEN]; // the device name. Could be /./DEVICE_NAME/ - void* (*d_read)(void* arg, int len); // read from device. - void (*d_write)(void* arg, int len); - void (*d_wait)(void); // write to device. - struct _DDK_DEVICE* (*d_open)(const char* path); // open device. - void (*d_close)(struct _DDK_DEVICE* dev); // close device. +typedef struct _DDK_DEVICE DDK_FINAL { + char d_name[DDK_DEVICE_NAME_LEN]; // the device name. Could be /./DEVICE_NAME/ + void* (*d_read)(void* arg, int len); // read from device. + void (*d_write)(void* arg, int len); + void (*d_wait)(void); // write to device. + struct _DDK_DEVICE* (*d_open)(const char* path); // open device. + void (*d_close)(struct _DDK_DEVICE* dev); // close device. } DDK_DEVICE, *DDK_DEVICE_PTR; /// @brief Open a new device from path. diff --git a/dev/ddk/DDKKit/io.h b/dev/ddk/DDKKit/io.h index 076af518..28396608 100644 --- a/dev/ddk/DDKKit/io.h +++ b/dev/ddk/DDKKit/io.h @@ -1,8 +1,8 @@ /* ------------------------------------------- - Copyright Amlal El Mahrouss. + Copyright Amlal El Mahrouss. - Purpose: DDK Text I/O. + Purpose: DDK Text I/O. ------------------------------------------- */ diff --git a/dev/ddk/DDKKit/str.h b/dev/ddk/DDKKit/str.h index cb4a7d36..fbf6506d 100644 --- a/dev/ddk/DDKKit/str.h +++ b/dev/ddk/DDKKit/str.h @@ -1,8 +1,8 @@ /* ------------------------------------------- - Copyright Amlal El Mahrouss. + Copyright Amlal El Mahrouss. - Purpose: DDK Strings. + Purpose: DDK Strings. ------------------------------------------- */ @@ -14,4 +14,4 @@ /// @file str.h DDK_EXTERN size_t kstrlen(const char* in); -DDK_EXTERN int kstrncpy(char* dst, const char* src, size_t len); +DDK_EXTERN int kstrncpy(char* dst, const char* src, size_t len); |
