summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKAKit/KernelKit
diff options
context:
space:
mode:
authorAmlal <amlal.elmahrouss@icloud.com>2024-10-30 08:57:05 +0100
committerAmlal <amlal.elmahrouss@icloud.com>2024-10-30 08:57:05 +0100
commit96a4f30672702e34afea4014487936fccb850779 (patch)
tree7e3e39c63335158143450bf6bcaf9fae20b6cbfd /dev/ZKAKit/KernelKit
parent8600ffcc1ddfc861e761baf2682490061a55cca8 (diff)
META: Daily bump.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKAKit/KernelKit')
-rw-r--r--dev/ZKAKit/KernelKit/DeviceMgr.h9
-rw-r--r--dev/ZKAKit/KernelKit/LPC.h2
-rw-r--r--dev/ZKAKit/KernelKit/ThreadLocalStorage.h6
-rw-r--r--dev/ZKAKit/KernelKit/User.h20
4 files changed, 21 insertions, 16 deletions
diff --git a/dev/ZKAKit/KernelKit/DeviceMgr.h b/dev/ZKAKit/KernelKit/DeviceMgr.h
index 088fe7e6..5e81c56c 100644
--- a/dev/ZKAKit/KernelKit/DeviceMgr.h
+++ b/dev/ZKAKit/KernelKit/DeviceMgr.h
@@ -21,7 +21,7 @@
#include <NewKit/ErrorOr.h>
#include <NewKit/Ref.h>
-#define cDevicePath "\\Mount\\"
+#define kDeviceRootDirPath "/Mount/"
// Last Rev
// Wed, Apr 3, 2024 9:09:41 AM
@@ -122,11 +122,14 @@ namespace Kernel
kDeviceTypeIDE,
kDeviceTypeEthernet,
kDeviceTypeWiFi,
+ kDeviceTypeFW,
+ kDeviceTypeBT,
kDeviceTypeRS232,
kDeviceTypeSCSI,
- kDeviceTypeSHCI,
+ kDeviceTypeAHCI,
+ kDeviceTypeMBCI,
kDeviceTypeUSB,
- kDeviceTypeMedia,
+ kDeviceTypeMediaCtrl,
kDeviceTypeCount,
};
} // namespace Kernel
diff --git a/dev/ZKAKit/KernelKit/LPC.h b/dev/ZKAKit/KernelKit/LPC.h
index f2d143bd..955f6ee2 100644
--- a/dev/ZKAKit/KernelKit/LPC.h
+++ b/dev/ZKAKit/KernelKit/LPC.h
@@ -13,7 +13,7 @@
#define ErrLocalIsOk() (Kernel::UserProcessScheduler::The().GetCurrentProcess().Leak().GetLocalCode() == Kernel::kErrorSuccess)
#define ErrLocalFailed() (Kernel::UserProcessScheduler::The().GetCurrentProcess().Leak().GetLocalCode() != Kernel::kErrorSuccess)
-#define ErrLocal() Kernel::UserProcessScheduler::The().GetCurrentProcess().Leak().GetLocalCode()
+#define ErrLocal() (Kernel::UserProcessScheduler::The().GetCurrentProcess().Leak().GetLocalCode())
namespace Kernel
{
diff --git a/dev/ZKAKit/KernelKit/ThreadLocalStorage.h b/dev/ZKAKit/KernelKit/ThreadLocalStorage.h
index b9fb691f..89eb627c 100644
--- a/dev/ZKAKit/KernelKit/ThreadLocalStorage.h
+++ b/dev/ZKAKit/KernelKit/ThreadLocalStorage.h
@@ -4,8 +4,8 @@
------------------------------------------- */
-#ifndef _KERNELKIT_TLS_HPP
-#define _KERNELKIT_TLS_HPP
+#ifndef _KERNELKIT_TLS_H
+#define _KERNELKIT_TLS_H
#include <NewKit/Defines.h>
@@ -51,4 +51,4 @@ EXTERN_C Kernel::Bool tls_check_syscall_impl(Kernel::VoidPtr TIB) noexcept;
// last rev 7/7/24
-#endif /* ifndef _KERNELKIT_TLS_HPP */
+#endif /* ifndef _KERNELKIT_TLS_H */
diff --git a/dev/ZKAKit/KernelKit/User.h b/dev/ZKAKit/KernelKit/User.h
index f894b8a0..3e48f1bd 100644
--- a/dev/ZKAKit/KernelKit/User.h
+++ b/dev/ZKAKit/KernelKit/User.h
@@ -13,19 +13,19 @@
#include <NewKit/Defines.h>
// user mode users.
-#define kSuperUser "ZKA AUTHORITY\\SUPER"
-#define kGuestUser "ZKA AUTHORITY\\GUEST"
+#define kSuperUser "OS AUTHORITY/SUPER"
+#define kGuestUser "OS AUTHORITY/GUEST"
-#define kUsersDir "\\Users\\"
+#define kUsersDir "/Users/"
#define kMaxUserNameLen (255)
-#define kMaxUserTokenLen (255)
+#define kMaxUserTokenLen (4096)
namespace Kernel
{
class User;
- enum class RingKind
+ enum class UserRingKind
{
kRingStdUser = 1,
kRingSuperUser = 2,
@@ -33,13 +33,15 @@ namespace Kernel
kRingCount = 3,
};
+ typedef Char* UserPublicKey;
+
class User final
{
public:
explicit User() = delete;
User(const Int32& sel, const Char* userName);
- User(const RingKind& kind, const Char* userName);
+ User(const UserRingKind& kind, const Char* userName);
~User();
@@ -52,7 +54,7 @@ namespace Kernel
public:
/// @brief Get software ring
- const RingKind& Ring() noexcept;
+ const UserRingKind& Ring() noexcept;
/// @brief Get user name
Char* Name() noexcept;
@@ -63,10 +65,10 @@ namespace Kernel
/// @brief Is she a super user?
Bool IsSuperUser() noexcept;
- Bool TrySave(const Char* password) noexcept;
+ Bool TrySave(const UserPublicKey password) noexcept;
private:
- RingKind fRing{RingKind::kRingStdUser};
+ UserRingKind fRing{UserRingKind::kRingStdUser};
Char fUserName[kMaxUserNameLen] = {0};
Char fUserToken[kMaxUserTokenLen] = {0};
};