mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:07:43 +00:00
Kernel: Add a method to check the type of a StorageController
Also, the device method in the StorageController class is public now.
This commit is contained in:
parent
28599af387
commit
e3b3805abf
2 changed files with 8 additions and 1 deletions
|
@ -46,13 +46,19 @@ class StorageController : public RefCounted<StorageController>
|
|||
, public PCI::DeviceController {
|
||||
AK_MAKE_ETERNAL
|
||||
public:
|
||||
enum class Type : u8 {
|
||||
IDE,
|
||||
NVMe
|
||||
};
|
||||
virtual Type type() const = 0;
|
||||
virtual RefPtr<StorageDevice> device(u32 index) = 0;
|
||||
|
||||
protected:
|
||||
explicit StorageController(PCI::Address address)
|
||||
: PCI::DeviceController(address)
|
||||
{
|
||||
}
|
||||
|
||||
virtual RefPtr<StorageDevice> device(u32 index) = 0;
|
||||
virtual void start_request(const StorageDevice&, AsyncBlockDeviceRequest&) = 0;
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue