mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +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
Notes:
sideshowbarker
2024-07-18 03:09:32 +09:00
Author: https://github.com/bgianfo
Commit: 70ad18fbcd
Pull-request: https://github.com/SerenityOS/serenity/pull/10325
Reviewed-by: https://github.com/BenWiederhake
8 changed files with 45 additions and 40 deletions
|
@ -23,10 +23,9 @@ public:
|
|||
|
||||
// ^DiskDevice
|
||||
virtual StringView class_name() const override;
|
||||
virtual String storage_name() const override;
|
||||
|
||||
private:
|
||||
RamdiskDevice(const RamdiskController&, NonnullOwnPtr<Memory::Region>&&, int major, int minor);
|
||||
RamdiskDevice(const RamdiskController&, NonnullOwnPtr<Memory::Region>&&, int major, int minor, NonnullOwnPtr<KString> device_name);
|
||||
|
||||
// ^BlockDevice
|
||||
virtual void start_request(AsyncBlockDeviceRequest&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue