mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
649d2faeab
We had some inconsistencies before: - Sometimes "The", sometimes "the" - Sometimes trailing ".", sometimes no trailing "." I picked the most common one (lowecase "the", trailing ".") and applied it to all copyright headers. By using the exact same string everywhere we can ensure nothing gets missed during a global search (and replace), and that these inconsistencies are not spread any further (as copyright headers are commonly copied to new files).
39 lines
1,023 B
C++
39 lines
1,023 B
C++
/*
|
|
* Copyright (c) 2021, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/OwnPtr.h>
|
|
#include <AK/RefPtr.h>
|
|
#include <AK/Types.h>
|
|
#include <Kernel/Storage/RamdiskDevice.h>
|
|
#include <Kernel/Storage/StorageController.h>
|
|
#include <Kernel/Storage/StorageDevice.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class AsyncBlockDeviceRequest;
|
|
|
|
class RamdiskController final : public StorageController {
|
|
AK_MAKE_ETERNAL
|
|
public:
|
|
public:
|
|
static NonnullRefPtr<RamdiskController> initialize();
|
|
virtual ~RamdiskController() override;
|
|
|
|
virtual RefPtr<StorageDevice> device(u32 index) const override;
|
|
virtual bool reset() override;
|
|
virtual bool shutdown() override;
|
|
virtual size_t devices_count() const override;
|
|
virtual void start_request(const StorageDevice&, AsyncBlockDeviceRequest&) override;
|
|
virtual void complete_current_request(AsyncDeviceRequest::RequestResult) override;
|
|
|
|
private:
|
|
RamdiskController();
|
|
|
|
NonnullRefPtrVector<RamdiskDevice> m_devices;
|
|
};
|
|
}
|