mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:37:45 +00:00
Revert "Kernel/Storage: Remove the ramdisk implementation"
This reverts commit 4e0f85432a
as the
ramdisk code is useful for the bring-up of the aarch64 port. Once the
kernel supports better ram-based filesystems, this code will be removed
again.
This commit is contained in:
parent
4d68dcfca0
commit
187723776a
9 changed files with 227 additions and 0 deletions
36
Kernel/Storage/Ramdisk/Controller.h
Normal file
36
Kernel/Storage/Ramdisk/Controller.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Library/LockRefPtr.h>
|
||||
#include <Kernel/Storage/Ramdisk/Device.h>
|
||||
#include <Kernel/Storage/StorageController.h>
|
||||
#include <Kernel/Storage/StorageDevice.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class AsyncBlockDeviceRequest;
|
||||
|
||||
class RamdiskController final : public StorageController {
|
||||
public:
|
||||
static NonnullLockRefPtr<RamdiskController> initialize();
|
||||
virtual ~RamdiskController() override;
|
||||
|
||||
virtual LockRefPtr<StorageDevice> device(u32 index) const override;
|
||||
virtual bool reset() override;
|
||||
virtual bool shutdown() override;
|
||||
virtual size_t devices_count() const override;
|
||||
virtual void complete_current_request(AsyncDeviceRequest::RequestResult) override;
|
||||
|
||||
private:
|
||||
RamdiskController();
|
||||
|
||||
NonnullLockRefPtrVector<RamdiskDevice> m_devices;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue