summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/KernelKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-19 01:14:01 +0100
committerGitHub <noreply@github.com>2025-11-19 01:14:01 +0100
commit4fdc70b676fbed322ba09bc7fb886f3b87245baa (patch)
treeaea2324ca72b09fe32b29aa280fc43d4984956ef /dev/kernel/KernelKit
parent569f42832bd573337cb2daab1b767994a0bc3878 (diff)
parentf29e7e30fde2b994c86024659b41f56b64dce911 (diff)
Merge pull request #74 from nekernel-org/dev
fix: kernel: OpenHeFS and NeFS fixes, PCI and DriveMgr fixes.
Diffstat (limited to 'dev/kernel/KernelKit')
-rw-r--r--dev/kernel/KernelKit/DriveMgr.h17
-rw-r--r--dev/kernel/KernelKit/PCI/Iterator.h2
2 files changed, 12 insertions, 7 deletions
diff --git a/dev/kernel/KernelKit/DriveMgr.h b/dev/kernel/KernelKit/DriveMgr.h
index dd3f9614..1a6d1b08 100644
--- a/dev/kernel/KernelKit/DriveMgr.h
+++ b/dev/kernel/KernelKit/DriveMgr.h
@@ -52,7 +52,7 @@ enum {
/// @brief Media drive trait type.
struct DriveTrait final {
- Char fName[kDriveNameLen] = {0}; // /System, /boot, //./Devices/USB...
+ Char fName[kDriveNameLen] = "/media/null"; // /System, /boot, //./Devices/USB...
UInt32 fKind{}; // fMassStorage, fFloppy, fOpticalDrive.
UInt32 fFlags{}; // fReadOnly, fEPMDrive...
@@ -70,11 +70,11 @@ struct DriveTrait final {
Lba fLbaStart{0}, fLbaEnd{0};
SizeT fSectorSz{kDriveSectorSz};
- Void (*fInput)(DrivePacket& packet){};
- Void (*fOutput)(DrivePacket& packet){};
- Void (*fVerify)(DrivePacket& packet){};
- Void (*fInit)(DrivePacket& packet){};
- const Char* (*fProtocol)(Void){};
+ Void (*fInput)(DrivePacket& packet){nullptr};
+ Void (*fOutput)(DrivePacket& packet){nullptr};
+ Void (*fVerify)(DrivePacket& packet){nullptr};
+ Void (*fInit)(DrivePacket& packet){nullptr};
+ const Char* (*fProtocol)(Void){nullptr};
};
namespace Probe {
@@ -155,7 +155,12 @@ const Char* io_drv_kind(Void);
DriveTrait io_construct_blank_drive(Void) noexcept;
/// @brief Fetches the main drive.
+/// @param trait the new drive as a trait.
+Void io_construct_main_drive(DriveTrait& trait) noexcept;
+
+/// @brief Fetches the main drive.
/// @return the new drive as a trait.
+/// @deprecated use io_construct_main_drive(DriveTrait& trait) instead.
DriveTrait io_construct_main_drive(Void) noexcept;
namespace Detect {
diff --git a/dev/kernel/KernelKit/PCI/Iterator.h b/dev/kernel/KernelKit/PCI/Iterator.h
index 9ab746d9..743e73ea 100644
--- a/dev/kernel/KernelKit/PCI/Iterator.h
+++ b/dev/kernel/KernelKit/PCI/Iterator.h
@@ -23,7 +23,7 @@ class Iterator final {
Iterator() = delete;
public:
- explicit Iterator(const Types::PciDeviceKind& deviceType);
+ explicit Iterator(const Types::PciDeviceKind deviceType, UInt32 bar);
Iterator& operator=(const Iterator&) = default;
Iterator(const Iterator&) = default;