diff options
| author | Amlal <amlal@el-mahrouss-logic.com> | 2024-10-24 20:11:21 +0200 |
|---|---|---|
| committer | Amlal <amlal@el-mahrouss-logic.com> | 2024-10-24 20:11:21 +0200 |
| commit | b0850d02b7fba8f0e16092c7609e928907d2521d (patch) | |
| tree | 81ba785ba42607dff1df3538f305a23b8c2b1ce5 /dev | |
| parent | 52b4044ab4956597aee4c629ba5fe5ec8966beac (diff) | |
IMP: Doing a cleanup and finishing the first version of ZKA.
Signed-off-by: Amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'dev')
46 files changed, 73 insertions, 438 deletions
diff --git a/dev/base/.keepme b/dev/base/.keepme deleted file mode 100644 index e69de29b..00000000 --- a/dev/base/.keepme +++ /dev/null diff --git a/dev/base/EncryptFS/ReadMe.md b/dev/base/EncryptFS/ReadMe.md deleted file mode 100644 index c9304515..00000000 --- a/dev/base/EncryptFS/ReadMe.md +++ /dev/null @@ -1,11 +0,0 @@ -# ZKA Encrypted File System. - -### Purpose: - -This is ZKA's Encrypted File System DLL. - -### Building: - -`btb build.json` - -###### (c) ZKA Web Services Co, all rights reserved. diff --git a/dev/base/EncryptFS/build.json b/dev/base/EncryptFS/build.json deleted file mode 100644 index 4dcefa38..00000000 --- a/dev/base/EncryptFS/build.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compiler_path": "x86_64-w64-mingw32-g++", - "compiler_std": "c++20", - "headers_path": ["../", "./"], - "sources_path": ["src/*.cc"], - "output_name": "efs.zsc", - "compiler_flags": [ - "-ffreestanding", - "-shared", - "-fno-rtti", - "-fno-exceptions", - " -Wl,--subsystem=17" - ], - "cpp_macros": [ - "__EFS_AMD64__", - "cEFSVersion=0x0100", - "cEFSVersionHighest=0x0100", - "cEFSVersionLowest=0x0100" - ] -} diff --git a/dev/base/EncryptFS/disk_crypt.h b/dev/base/EncryptFS/disk_crypt.h deleted file mode 100644 index 981ebc78..00000000 --- a/dev/base/EncryptFS/disk_crypt.h +++ /dev/null @@ -1,31 +0,0 @@ -/* -------------------------------------------
-
- Copyright ZKA Web Services Co.
-
- File: disk_encrypt.h
- Purpose: Disk Encryption File System
-
- Revision History:
-
- 8/8/2024: Added file (amlel)
-
-------------------------------------------- */
-
-#pragma once
-
-#include <FSKit/NeFS.h>
-
-namespace Kernel
-{
- /**************************************** */
- /// @brief Locks an EFS partition.
- /**************************************** */
-
- Int32 efs_lock_partition(const Char* partition_name, const Char* password, SizeT length);
-
- /**************************************** */
- /// @brief Unlocks an EFS partition.
- /**************************************** */
-
- Int32 efs_unlock_partition(const Char* partition_name, const Char* password, SizeT length);
-} // namespace Kernel
diff --git a/dev/base/EncryptFS/src/disk_crypt.cc b/dev/base/EncryptFS/src/disk_crypt.cc deleted file mode 100644 index 334e2d4d..00000000 --- a/dev/base/EncryptFS/src/disk_crypt.cc +++ /dev/null @@ -1,14 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Web Services Co. - -------------------------------------------- */ - -#include <EncryptFS/disk_crypt.h> - -enum -{ - kEFSFlagEncryptedFree = 0x00, - kEFSFlagEncryptedUnlocked = 0x3f, - kEFSFlagEncryptedLock = 0xf3, -}; diff --git a/dev/base/FireWall/FireWall.h b/dev/base/FireWall/FireWall.h deleted file mode 100644 index b9a1c57e..00000000 --- a/dev/base/FireWall/FireWall.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) 2024 ZKA Web Services Co - */ - -#pragma once - -#include <sci/sci_base.h> - -IMPORT_C Bool FwAllowConnection(const Char* ip_address, SizeT ip_address_len, Bool is_ipv6); - -IMPORT_C Bool FwForbidConnection(const Char* ip_address, SizeT ip_address_len, Bool is_ipv6); diff --git a/dev/base/FireWall/build.json b/dev/base/FireWall/build.json deleted file mode 100644 index 77657ca5..00000000 --- a/dev/base/FireWall/build.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compiler_path": "x86_64-w64-mingw32-g++.exe", - "compiler_std": "c++20", - "headers_path": [ "../", "./", "../../" ], - "sources_path": [ "src/*.cc" ], - "output_name": "firewall.exe", - "compiler_flags": [ - "-ffreestanding", - "-fno-rtti", - "-fno-exceptions", - "-Wl,--subsystem=17" - ], - "cpp_macros": [ - "__FIREWALL_AMD64__", - "cFWVersion=0x0100", - "cFWVersionHighest=0x0100", - "cFWVersionLowest=0x0100" - ] -} diff --git a/dev/base/FireWall/src/FireWall.cc b/dev/base/FireWall/src/FireWall.cc deleted file mode 100644 index 1afae1c5..00000000 --- a/dev/base/FireWall/src/FireWall.cc +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2024 ZKA Web Services Co - */ - -#include <FireWall/FireWall.h> - -struct FW_CONNECTION_ENTRY -{ - Bool is_ipv6, is_allowed; - Char f_ip_address; - SizeT f_ip_address_len; -}; - -IMPORT_C Bool FwAllowConnection(const Char* ip_address, SizeT ip_address_len, Bool is_ipv6) -{ - if (!ip_address || - !ip_address_len) - return No; - - - - return Yes; -} - -IMPORT_C Bool FwForbidConnection(const Char* ip_address, SizeT ip_address_len, Bool is_ipv6) -{ - if (!ip_address || - !ip_address_len) - return No; - - - - return Yes; -} diff --git a/dev/base/ReadMe.md b/dev/base/ReadMe.md deleted file mode 100644 index 83d9dfec..00000000 --- a/dev/base/ReadMe.md +++ /dev/null @@ -1,7 +0,0 @@ -# ZKA User apps and services.
-
-## Description:
-
-- Provides firewall, filesystem encrypter and rundll/runxpcom tools.
-
-###### Copyright ZKA Web Services Co, all rights reserved.
diff --git a/dev/base/RunDLL64/build.json b/dev/base/RunDLL64/build.json deleted file mode 100644 index b129f8e4..00000000 --- a/dev/base/RunDLL64/build.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compiler_path": "x86_64-w64-mingw32-g++", - "compiler_std": "c++20", - "headers_path": ["../", "./", "../../"], - "sources_path": ["src/*.cc"], - "output_name": "rundll64.exe", - "compiler_flags": [ - "-ffreestanding", - "-fno-rtti", - "-fno-exceptions", - "-Wl,--subsystem=17" - ], - "cpp_macros": [ - "__RUNDLL_AMD64__", - "cRunDLLVersion=0x0100", - "cRunDLLVersionHighest=0x0100", - "cRunDLLVersionLowest=0x0100" - ] -} diff --git a/dev/base/RunDLL64/src/Main.cc b/dev/base/RunDLL64/src/Main.cc deleted file mode 100644 index ee3cdfa6..00000000 --- a/dev/base/RunDLL64/src/Main.cc +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2024 ZKA Web Services Co - */ - -#include <sci/sci_base.h> - -typedef int (*MainKind)(int, char**); - -int main(int argc, char* argv[]) -{ - if (argc < 3) - return -1; - - auto mainDll = LdrOpenDLL(argv[1], argv[2]); - - int (*entrypointOff)(int, char**) = (MainKind)LdrGetDLLProc(argv[3], mainDll); - - if (!entrypointOff) - return -1; - - int ret = entrypointOff(argc, argv); - - LdrCloseDLL(mainDll); - - return ret; -} diff --git a/dev/base/RunXPCOM/build.json b/dev/base/RunXPCOM/build.json deleted file mode 100644 index ec91d543..00000000 --- a/dev/base/RunXPCOM/build.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compiler_path": "x86_64-w64-mingw32-g++", - "compiler_std": "c++20", - "headers_path": ["../", "./", "../../"], - "sources_path": ["src/*.cc"], - "output_name": "runxpcom.exe", - "compiler_flags": [ - "-ffreestanding", - "-fno-rtti", - "-fno-exceptions", - "-Wl,--subsystem=17" - ], - "cpp_macros": [ - "__SCM_AMD64__", - "cSCMVersion=0x0100", - "cSCMVersionHighest=0x0100", - "cSCMVersionLowest=0x0100" - ] -} diff --git a/dev/base/RunXPCOM/src/Main.cc b/dev/base/RunXPCOM/src/Main.cc deleted file mode 100644 index 3fcfc708..00000000 --- a/dev/base/RunXPCOM/src/Main.cc +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2024 ZKA Web Services Co - */ - -#include <sci/sci_base.h> - -typedef SInt32 (*RPCProcKind)(IUnknown*); - -/** - * @brief Main procedure for DLL runner. - */ -int main(int argc, char* argv[]) -{ - if (argc < 4) - return -1; - - auto mainDll = LdrOpenDLL(argv[1], argv[2]); - - IUnknown* interface = (IUnknown*)LdrGetDLLProc(argv[3], mainDll); - RPCProcKind dllRpc = (RPCProcKind)LdrGetDLLProc(argv[4], mainDll); - - if (!dllRpc) - return -1; - if (!interface) - return -1; - - auto ret = dllRpc(interface); - - LdrCloseDLL(mainDll); - - return ret; -} diff --git a/dev/base/View/IPDF.h b/dev/base/View/IPDF.h deleted file mode 100644 index b28806d7..00000000 --- a/dev/base/View/IPDF.h +++ /dev/null @@ -1,51 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Web Services Co. - -------------------------------------------- */ - -#pragma once - -#include <sci/sci_base.h> - -namespace View::PDF -{ - class IPDF; - class IPDFDocument; - class IPDFTimestamp; - class IPDFTag; - - /// \brief PDF manipulator class. - class IPDF - { - public: - explicit IPDF() = default; - virtual ~IPDF() = default; - - IPDF& operator=(const IPDF&) = delete; - IPDF(const IPDF&) = delete; - - virtual IPDFDocument* GetFirstPage() = 0; - virtual IPDFDocument* GetLastPage() = 0; - - virtual IPDFDocument* GetPage(const UInt32& page_number); - virtual SInt32 SetPage(const UInt32& page_number, IPDFDocument* new_page); - - virtual Void SetProducer(const Char*) = 0; - virtual Void SetTitle(const Char*) = 0; - virtual Void SetAuthor(const Char*) = 0; - virtual Void SetSubject(const Char*) = 0; - - virtual const Char* GetProducer() = 0; - virtual const Char* GetTitle() = 0; - virtual const Char* GetAuthor() = 0; - virtual const Char* GetSubject() = 0; - - virtual Bool IsFastView() = 0; - - virtual SizeT GetWidth() = 0; - virtual SizeT GetHeight() = 0; - - virtual SizeT GetPageCount() = 0; - }; -} // namespace View::PDF diff --git a/dev/base/View/VPainter.h b/dev/base/View/VPainter.h deleted file mode 100644 index c39a9780..00000000 --- a/dev/base/View/VPainter.h +++ /dev/null @@ -1,9 +0,0 @@ -/* ------------------------------------------- - -Copyright ZKA Web Services Co. - -------------------------------------------- */ - -#pragma once - -#include <sci/sci_base.h> diff --git a/dev/base/View/build.json b/dev/base/View/build.json deleted file mode 100644 index a98e8730..00000000 --- a/dev/base/View/build.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compiler_path": "x86_64-w64-mingw32-g++", - "compiler_std": "c++20", - "headers_path": ["../", "../../", "../../zka"], - "sources_path": ["src/*.cc"], - "output_name": "ViewPDF.exe", - "compiler_flags": [ - "-fPIC", - "-ffreestanding", - "-shared", - "-fno-rtti", - "-fno-exceptions", - "-Wl,--subsystem=17" - ], - "cpp_macros": [ - "__VIEW_PDF_IMPL__", - "cPDFVersion=0x0100", - "cPDFVersionHighest=0x0100", - "cPDFVersionLowest=0x0100" - ] -} diff --git a/dev/base/View/src/IPDF.cc b/dev/base/View/src/IPDF.cc deleted file mode 100644 index 2126b64a..00000000 --- a/dev/base/View/src/IPDF.cc +++ /dev/null @@ -1,7 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Web Services Co. - -------------------------------------------- */ - -#include <View/IPDF.h> diff --git a/dev/base/View/src/VPainter.cc b/dev/base/View/src/VPainter.cc deleted file mode 100644 index 92f1075a..00000000 --- a/dev/base/View/src/VPainter.cc +++ /dev/null @@ -1,7 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Web Services Co. - -------------------------------------------- */ - -#include <View/VPainter.h> diff --git a/dev/crt/alloca.h b/dev/crt/alloca.h index 857a0ade..35e742d8 100644 --- a/dev/crt/alloca.h +++ b/dev/crt/alloca.h @@ -11,9 +11,9 @@ #include <crt/defines.h> -inline ptr_type __ndk_alloca(size_type sz) +inline ptr_type __rt_alloca(size_type sz) { return __builtin_alloca(sz); } -#define alloca __ndk_alloca +#define alloca __rt_alloca diff --git a/dev/crt/defines.h b/dev/crt/defines.h index ea821505..f9c85387 100644 --- a/dev/crt/defines.h +++ b/dev/crt/defines.h @@ -4,8 +4,8 @@ ------------------------------------------- */ -#ifndef __TOOLCHAINKIT_DEFINES_HXX__ -#define __TOOLCHAINKIT_DEFINES_HXX__ +#ifndef __TOOLCHAINKIT_DEFINES_H__ +#define __TOOLCHAINKIT_DEFINES_H__ #include <stdint.h> #include <stddef.h> @@ -26,7 +26,7 @@ typedef char* caddr_t; #ifdef __GNUC__ #include <crt/alloca.h> #elif defined(__TOOLCHAINKIT__) -#define __alloca(sz) __ndk_alloca(sz) +#define __alloca(sz) __rt_alloca(sz) #endif #define __deref(ptr) (*(ptr)) @@ -103,4 +103,4 @@ namespace std } } // namespace std -#endif /* __TOOLCHAINKIT_DEFINES_HXX__ */ +#endif /* __TOOLCHAINKIT_DEFINES_H__ */ diff --git a/dev/install/.keepme b/dev/install/.keepme deleted file mode 100644 index e69de29b..00000000 --- a/dev/install/.keepme +++ /dev/null diff --git a/dev/install/ReadMe.md b/dev/install/ReadMe.md deleted file mode 100644 index ff9b0dbf..00000000 --- a/dev/install/ReadMe.md +++ /dev/null @@ -1,5 +0,0 @@ -# ReadMe: install
-
-This is the ZKA installer, installs the OS into an Hard-Drive.
-
-###### Copyright ZKA Web Services Co, all rights reserved.
diff --git a/dev/install/hal/install_api.asm b/dev/install/hal/install_api.asm deleted file mode 100644 index 76a198b6..00000000 --- a/dev/install/hal/install_api.asm +++ /dev/null @@ -1,31 +0,0 @@ -;; /* -;; * --------------------------------------------------- -;; * -;; * Copyright ZKA Web Services Co. -;; * -;; * File: Install.asm -;; * Purpose: ZKA installer program, runs at ring-0. -;; * -;; * --------------------------------------------------- -;; */ - -[bits 64] - -[global kInstallTitle] -[global InstInstallToDir] - -section .data - -kInstallTitle: db "Formatting...", 0 - -section .text - -;; @param r8 arg 1 -;; @param r9 arg 2 -;; @return rax, return status of syscall. -;; @note MS-ABI procedure. -InstInstallToDir: - mov r8, rcx ; FILE_INFO_STRUCT (SRC) - mov r9, rdx ; FILE_INFO_STRUCT (DST) - syscall ;; 0 = GOOD, 1 = BAD FIS (SRC), 2 = BAD FIS (DST) - ret diff --git a/dev/modules/ACPI/ACPIFactoryInterface.h b/dev/modules/ACPI/ACPIFactoryInterface.h index f3f041fc..105afc58 100644 --- a/dev/modules/ACPI/ACPIFactoryInterface.h +++ b/dev/modules/ACPI/ACPIFactoryInterface.h @@ -4,8 +4,8 @@ ------------------------------------------- */ -#ifndef __MOD_ACPI_HXX__ -#define __MOD_ACPI_HXX__ +#ifndef __MOD_ACPI_H__ +#define __MOD_ACPI_H__ #include <KernelKit/DebugOutput.h> #include <modules/ACPI/ACPI.h> @@ -57,4 +57,4 @@ namespace Kernel }; } // namespace Kernel -#endif // !__MOD_ACPI_HXX__ +#endif // !__MOD_ACPI_H__ diff --git a/dev/modules/NVME/NVME.h b/dev/modules/NVME/NVME.h index dd9bbb74..f0099cb2 100644 --- a/dev/modules/NVME/NVME.h +++ b/dev/modules/NVME/NVME.h @@ -9,8 +9,8 @@ ------------------------------------------- */ -#ifndef __MODULE_NVME_HXX__ -#define __MODULE_NVME_HXX__ +#ifndef __MODULE_NVME_H__ +#define __MODULE_NVME_H__ #include <NewKit/Defines.h> @@ -109,4 +109,4 @@ namespace Kernel } } // namespace Kernel -#endif // ifndef __MODULE_NVME_HXX__ +#endif // ifndef __MODULE_NVME_H__ diff --git a/dev/sci/sci_base.h b/dev/sci/sci_base.h index 73d7e87e..eca69595 100644 --- a/dev/sci/sci_base.h +++ b/dev/sci/sci_base.h @@ -7,8 +7,8 @@ Purpose: SCI core header file (C++ only). ------------------------------------------- */
-#ifndef __SCI_BASE_HXX__
-#define __SCI_BASE_HXX__
+#ifndef __SCI_BASE_H__
+#define __SCI_BASE_H__
#include <sci/sci_hint.h>
@@ -316,4 +316,4 @@ IMPORT_C Void EvtRemoveListener(_Input const Char* event_name, _Input SCIObject /// @return the event data.
IMPORT_C VoidPtr EvtDispatchEvent(_Input const Char* event_name, _Input VoidPtr event_data);
-#endif // ifndef __SCI_BASE_HXX__
+#endif // ifndef __SCI_BASE_H__
diff --git a/dev/sci/sci_hint.h b/dev/sci/sci_hint.h index 967d0ad0..b550bac5 100644 --- a/dev/sci/sci_hint.h +++ b/dev/sci/sci_hint.h @@ -4,8 +4,8 @@ ------------------------------------------- */ -#ifndef __SCI_HINT_HXX__ -#define __SCI_HINT_HXX__ +#ifndef __SCI_HINT_H__ +#define __SCI_HINT_H__ #pragma compiler(hint_manifest) @@ -20,4 +20,4 @@ #define _InOut #define _StrictInOut -#endif // ifndef __SCI_HINT_HXX__ +#endif // ifndef __SCI_HINT_H__ diff --git a/dev/udf/.keep b/dev/udf/.keep deleted file mode 100644 index e69de29b..00000000 --- a/dev/udf/.keep +++ /dev/null diff --git a/dev/zka/CFKit/LoaderUtils.h b/dev/zka/CFKit/LoaderUtils.h index 4a30ec84..b438de2a 100644 --- a/dev/zka/CFKit/LoaderUtils.h +++ b/dev/zka/CFKit/LoaderUtils.h @@ -1,5 +1,5 @@ -#ifndef __CFKIT_LOADER_UTILS_HXX__ -#define __CFKIT_LOADER_UTILS_HXX__ +#ifndef __CFKIT_LOADER_UTILS_H__ +#define __CFKIT_LOADER_UTILS_H__ #include <KernelKit/PE.h> #include <KernelKit/MSDOS.h> @@ -50,4 +50,4 @@ namespace Kernel } } // namespace Kernel -#endif // ifndef __CFKIT_LOADER_UTILS_HXX__ +#endif // ifndef __CFKIT_LOADER_UTILS_H__ diff --git a/dev/zka/CompressKit/GZip.h b/dev/zka/CompressKit/GZip.h index cd1b9744..3a1144f2 100644 --- a/dev/zka/CompressKit/GZip.h +++ b/dev/zka/CompressKit/GZip.h @@ -4,8 +4,8 @@ ------------------------------------------- */ -#ifndef __KERNELKIT_GZIP_HXX__ -#define __KERNELKIT_GZIP_HXX__ +#ifndef __KERNELKIT_GZIP_H__ +#define __KERNELKIT_GZIP_H__ #include <NewKit/Defines.h> @@ -15,4 +15,4 @@ namespace Kernel::GZip class IGZipProxy; } // namespace Kernel::GZip -#endif // !__KERNELKIT_GZIP_HXX__ +#endif // !__KERNELKIT_GZIP_H__ diff --git a/dev/zka/CompressKit/RLE.h b/dev/zka/CompressKit/RLE.h index 64cd53ca..9101b0b9 100644 --- a/dev/zka/CompressKit/RLE.h +++ b/dev/zka/CompressKit/RLE.h @@ -4,8 +4,8 @@ ------------------------------------------- */ -#ifndef __KERNELKIT_RLE_HXX__ -#define __KERNELKIT_RLE_HXX__ +#ifndef __KERNELKIT_RLE_H__ +#define __KERNELKIT_RLE_H__ #include <NewKit/Defines.h> @@ -15,4 +15,4 @@ namespace Kernel class IRleProxy; } // namespace Kernel -#endif // !ifndef __KERNELKIT_RLE_HXX__ +#endif // !ifndef __KERNELKIT_RLE_H__ diff --git a/dev/zka/FirmwareKit/EPM.h b/dev/zka/FirmwareKit/EPM.h index 7ff976a0..ab713a0a 100644 --- a/dev/zka/FirmwareKit/EPM.h +++ b/dev/zka/FirmwareKit/EPM.h @@ -8,8 +8,8 @@ @brief The Explicit Partition Map scheme. */ -#ifndef __FIRMWARE_EPM_HXX__ -#define __FIRMWARE_EPM_HXX__ +#ifndef __FIRMWARE_EPM_H__ +#define __FIRMWARE_EPM_H__ #include <NewKit/Defines.h> @@ -119,4 +119,4 @@ enum typedef struct _BOOT_BLOCK_STRUCT BOOT_BLOCK_STRUCT; -#endif // ifndef __FIRMWARE_EPM_HXX__ +#endif // ifndef __FIRMWARE_EPM_H__ diff --git a/dev/zka/HintKit/CompilerHint.h b/dev/zka/HintKit/CompilerHint.h index da670509..1cec5fa9 100644 --- a/dev/zka/HintKit/CompilerHint.h +++ b/dev/zka/HintKit/CompilerHint.h @@ -4,8 +4,8 @@ ------------------------------------------- */ -#ifndef __HINTKIT_COMPILER_HINT_HXX__ -#define __HINTKIT_COMPILER_HINT_HXX__ +#ifndef __HINTKIT_COMPILER_HINT_H__ +#define __HINTKIT_COMPILER_HINT_H__ #pragma compiler(hint_manifest) @@ -20,4 +20,4 @@ #define _InOut #define _StrictInOut -#endif // ifndef __HINTKIT_COMPILER_HINT_HXX__ +#endif // ifndef __HINTKIT_COMPILER_HINT_H__ diff --git a/dev/zka/KernelKit/DriveMgr.h b/dev/zka/KernelKit/DriveMgr.h index 850217cb..db857a3c 100644 --- a/dev/zka/KernelKit/DriveMgr.h +++ b/dev/zka/KernelKit/DriveMgr.h @@ -4,8 +4,8 @@ ------------------------------------------- */ -#ifndef __INC_DRIVE_MANAGER_HXX__ -#define __INC_DRIVE_MANAGER_HXX__ +#ifndef __INC_DRIVE_MANAGER_H__ +#define __INC_DRIVE_MANAGER_H__ #include <KernelKit/UserProcessScheduler.h> #include <CompilerKit/CompilerKit.h> @@ -152,4 +152,4 @@ namespace Kernel DriveTrait io_construct_main_drive(void) noexcept; } // namespace Kernel -#endif /* ifndef __INC_DRIVE_MANAGER_HXX__ */ +#endif /* ifndef __INC_DRIVE_MANAGER_H__ */ diff --git a/dev/zka/KernelKit/FileMgr.h b/dev/zka/KernelKit/FileMgr.h index cdda89e7..af302a64 100644 --- a/dev/zka/KernelKit/FileMgr.h +++ b/dev/zka/KernelKit/FileMgr.h @@ -19,9 +19,9 @@ #pragma once -#ifdef __FSKIT_USE_NEFS__ +#ifdef __FSKIT_INCLUDES_NEFS__ #include <FSKit/NeFS.h> -#endif // __FSKIT_USE_NEFS__ +#endif // __FSKIT_INCLUDES_NEFS__ #include <CompilerKit/CompilerKit.h> #include <HintKit/CompilerHint.h> @@ -135,7 +135,7 @@ namespace Kernel virtual bool Rewind(_Input NodePtr node) = 0; }; -#ifdef __FSKIT_USE_NEFS__ +#ifdef __FSKIT_INCLUDES_NEFS__ /** * @brief Based of IFilesystemMgr, takes care of managing NeFS * disks. @@ -184,7 +184,7 @@ namespace Kernel NeFSParser* fImpl{nullptr}; }; -#endif // ifdef __FSKIT_USE_NEFS__ +#endif // ifdef __FSKIT_INCLUDES_NEFS__ /** * Usable FileStream diff --git a/dev/zka/KernelKit/IPEFDLLObject.h b/dev/zka/KernelKit/IPEFDLLObject.h index 8c0703ed..49d3519a 100644 --- a/dev/zka/KernelKit/IPEFDLLObject.h +++ b/dev/zka/KernelKit/IPEFDLLObject.h @@ -7,8 +7,8 @@ * ======================================================== */ -#ifndef __KERNELKIT_SHARED_OBJECT_HXX__ -#define __KERNELKIT_SHARED_OBJECT_HXX__ +#ifndef __KERNELKIT_SHARED_OBJECT_H__ +#define __KERNELKIT_SHARED_OBJECT_H__ #include <KernelKit/PEF.h> #include <NewKit/Defines.h> @@ -103,4 +103,4 @@ namespace Kernel EXTERN_C Void rtl_fini_dll(UserProcess* header, IDLL lib, Bool* successful); } // namespace Kernel -#endif /* ifndef __KERNELKIT_SHARED_OBJECT_HXX__ */ +#endif /* ifndef __KERNELKIT_SHARED_OBJECT_H__ */ diff --git a/dev/zka/KernelKit/PE.h b/dev/zka/KernelKit/PE.h index b077f251..186f7e9f 100644 --- a/dev/zka/KernelKit/PE.h +++ b/dev/zka/KernelKit/PE.h @@ -11,8 +11,8 @@ ------------------------------------------- */ -#ifndef __KERNELKIT_INC_PE_HXX__ -#define __KERNELKIT_INC_PE_HXX__ +#ifndef __KERNELKIT_INC_PE_H__ +#define __KERNELKIT_INC_PE_H__ #include <NewKit/Defines.h> @@ -140,4 +140,4 @@ enum cPEResourceId = 0xFFaadd00, }; -#endif /* ifndef __KERNELKIT_INC_PE_HXX__ */ +#endif /* ifndef __KERNELKIT_INC_PE_H__ */ diff --git a/dev/zka/KernelKit/PEF.h b/dev/zka/KernelKit/PEF.h index 15f9c5e2..5c010503 100644 --- a/dev/zka/KernelKit/PEF.h +++ b/dev/zka/KernelKit/PEF.h @@ -11,8 +11,8 @@ ------------------------------------------- */ -#ifndef __KERNELKIT_INC_PEF_HXX__ -#define __KERNELKIT_INC_PEF_HXX__ +#ifndef __KERNELKIT_INC_PEF_H__ +#define __KERNELKIT_INC_PEF_H__ #include <CompilerKit/CompilerKit.h> #include <KernelKit/LoaderInterface.h> @@ -113,4 +113,4 @@ namespace Kernel #define kPefForkKind kPefMagic #define kPefForkKindFAT kPefMagicFat -#endif /* ifndef __KERNELKIT_INC_PEF_HXX__ */ +#endif /* ifndef __KERNELKIT_INC_PEF_H__ */ diff --git a/dev/zka/KernelKit/PEFCodeMgr.h b/dev/zka/KernelKit/PEFCodeMgr.h index 8ad9eb01..01b4c6bd 100644 --- a/dev/zka/KernelKit/PEFCodeMgr.h +++ b/dev/zka/KernelKit/PEFCodeMgr.h @@ -46,11 +46,11 @@ namespace Kernel bool IsLoaded() noexcept; private: -#ifdef __FSKIT_USE_NEFS__ +#ifdef __FSKIT_INCLUDES_NEFS__ OwnPtr<FileStream<Char, NeFileSystemMgr>> fFile; #else OwnPtr<FileStream<Char>> fFile; -#endif // __FSKIT_USE_NEFS__ +#endif // __FSKIT_INCLUDES_NEFS__ Ref<StringView> fPath; VoidPtr fCachedBlob; diff --git a/dev/zka/KernelKit/UserProcessScheduler.h b/dev/zka/KernelKit/UserProcessScheduler.h index 5faafc0b..b2300ddf 100644 --- a/dev/zka/KernelKit/UserProcessScheduler.h +++ b/dev/zka/KernelKit/UserProcessScheduler.h @@ -99,7 +99,7 @@ namespace Kernel // end of operator overloading. - enum ProcessSubsystemEnum : Int32 + enum class ProcessSubsystem: Int32 { kProcessSubsystemSecurity = 100, kProcessSubsystemApplication, @@ -109,7 +109,6 @@ namespace Kernel kProcessSubsystemCount = 4, }; - using ProcessSubsystem = ProcessSubsystemEnum; using ProcessTime = UInt64; using PID = Int64; diff --git a/dev/zka/KernelKit/XCOFF.h b/dev/zka/KernelKit/XCOFF.h index a7cf3aff..3961f085 100644 --- a/dev/zka/KernelKit/XCOFF.h +++ b/dev/zka/KernelKit/XCOFF.h @@ -11,8 +11,8 @@ ------------------------------------------- */ -#ifndef __INC_XCOFF_HXX__ -#define __INC_XCOFF_HXX__ +#ifndef INC_XOCFF_H +#define INC_XOCFF_H #include <NewKit/Defines.h> @@ -48,4 +48,4 @@ typedef struct XCoffForkHeader Kernel::Char fCodeSignFork[cForkNameLen]; } XCoffForkHeader; -#endif // ifndef __INC_XCOFF_HXX__ +#endif // ifndef INC_XOCFF_H diff --git a/dev/zka/amd64-efi.make b/dev/zka/amd64-efi.make index 8d9d1311..e39a55ab 100644 --- a/dev/zka/amd64-efi.make +++ b/dev/zka/amd64-efi.make @@ -6,7 +6,7 @@ CC = x86_64-w64-mingw32-g++ LD = x86_64-w64-mingw32-ld CCFLAGS = -fshort-wchar -c -D__ZKA_AMD64__ -mno-red-zone -fno-rtti -fno-exceptions \ - -std=c++20 -D__ZKA_SUPPORT_NX__ -I../Vendor -D__FSKIT_USE_NEFS__ \ + -std=c++20 -D__ZKA_SUPPORT_NX__ -I../Vendor -D__FSKIT_INCLUDES_NEFS__ \ -D__NEWOSKRNL__ -D__HAVE_ZKA_APIS__ -D__FREESTANDING__ -D__ZKA__ -I./ -I../ -I../zba ASM = nasm diff --git a/dev/zka/src/FS/HPFS.cc b/dev/zka/src/FS/HPFS.cc index 0fb80079..e3af1e03 100644 --- a/dev/zka/src/FS/HPFS.cc +++ b/dev/zka/src/FS/HPFS.cc @@ -6,7 +6,17 @@ #ifdef __FSKIT_INCLUDES_HPFS__ -#include <FirmwareKit/GPT.h> +#include <modules/AHCI/AHCI.h> +#include <modules/ATA/ATA.h> +#include <modules/Flash/Flash.h> +#include <FSKit/HPFS.h> +#include <KernelKit/LPC.h> +#include <NewKit/Crc32.h> +#include <NewKit/Stop.h> +#include <NewKit/String.h> +#include <NewKit/Utils.h> #include <FirmwareKit/EPM.h> +#include <KernelKit/UserProcessScheduler.h> +#include <KernelKit/User.h> #endif // ifdef __FSKIT_INCLUDES_HPFS__ diff --git a/dev/zka/src/FS/NeFS.cc b/dev/zka/src/FS/NeFS.cc index 4c706f86..be3d407f 100644 --- a/dev/zka/src/FS/NeFS.cc +++ b/dev/zka/src/FS/NeFS.cc @@ -4,7 +4,7 @@ ------------------------------------------- */ -#ifdef __FSKIT_USE_NEFS__ +#ifdef __FSKIT_INCLUDES_NEFS__ #include <modules/AHCI/AHCI.h> #include <modules/ATA/ATA.h> @@ -1054,4 +1054,4 @@ namespace Kernel::Detail } // namespace Kernel::Detail #endif // !__ZKA_MINIMAL_OS__ -#endif // ifdef __FSKIT_USE_NEFS__ +#endif // ifdef __FSKIT_INCLUDES_NEFS__ diff --git a/dev/zka/src/NeFS+FileMgr.cc b/dev/zka/src/NeFS+FileMgr.cc index 3cc5400b..dcc9c3b2 100644 --- a/dev/zka/src/NeFS+FileMgr.cc +++ b/dev/zka/src/NeFS+FileMgr.cc @@ -8,7 +8,7 @@ #include <KernelKit/Heap.h> #ifndef __ZKA_MINIMAL_OS__ -#ifdef __FSKIT_USE_NEFS__ +#ifdef __FSKIT_INCLUDES_NEFS__ /// @brief NeFS File manager. /// BUGS: 0 @@ -244,5 +244,5 @@ namespace Kernel } } // namespace Kernel -#endif // ifdef __FSKIT_USE_NEFS__ +#endif // ifdef __FSKIT_INCLUDES_NEFS__ #endif // ifndef __ZKA_MINIMAL_OS__ diff --git a/dev/zka/src/NeFS+IO.cc b/dev/zka/src/NeFS+IO.cc index 010ec3f2..5a5f60c6 100644 --- a/dev/zka/src/NeFS+IO.cc +++ b/dev/zka/src/NeFS+IO.cc @@ -17,7 +17,7 @@ * *************************************************************/ -#ifdef __FSKIT_USE_NEFS__ +#ifdef __FSKIT_INCLUDES_NEFS__ #include <FirmwareKit/EPM.h> @@ -98,4 +98,4 @@ Int32 fs_newfs_write(MountpointInterface* Mnt, DriveTrait& DrvTrait, Int32 DrvIn return DrvTrait.fPacket.fPacketGood; } -#endif // ifdef __FSKIT_USE_NEFS__ +#endif // ifdef __FSKIT_INCLUDES_NEFS__ |
