mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
Kernel: Remove most String usage from storage_name() API
This change is another minor step towards removing `AK::String` from the Kernel. Instead of dynamically allocating the storage_name we can instead allocate it via a KString in the factory for each device, and then push the device name down into the StorageDevice base class. We don't have a way of doing `AK::String::formatted(..)` with a KString at the moment, so cleaning that up will be left for a later day.
This commit is contained in:
parent
3a945051fc
commit
70ad18fbcd
8 changed files with 45 additions and 40 deletions
|
@ -31,10 +31,9 @@ public:
|
|||
// ^StorageDevice
|
||||
// ^BlockDevice
|
||||
virtual void start_request(AsyncBlockDeviceRequest&) override;
|
||||
virtual String storage_name() const override;
|
||||
|
||||
private:
|
||||
SATADiskDevice(const AHCIController&, const AHCIPort&, size_t sector_size, u64 max_addressable_block);
|
||||
SATADiskDevice(const AHCIController&, const AHCIPort&, size_t sector_size, u64 max_addressable_block, int minor_device_number, NonnullOwnPtr<KString> device_name);
|
||||
|
||||
// ^DiskDevice
|
||||
virtual StringView class_name() const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue