diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-19 01:14:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-19 01:14:01 +0100 |
| commit | 4fdc70b676fbed322ba09bc7fb886f3b87245baa (patch) | |
| tree | aea2324ca72b09fe32b29aa280fc43d4984956ef /dev/kernel/KernelKit/DriveMgr.h | |
| parent | 569f42832bd573337cb2daab1b767994a0bc3878 (diff) | |
| parent | f29e7e30fde2b994c86024659b41f56b64dce911 (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/DriveMgr.h')
| -rw-r--r-- | dev/kernel/KernelKit/DriveMgr.h | 17 |
1 files changed, 11 insertions, 6 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 { |
