forked from Bananymous/banan-os
Kernel: move Device.h to its own directory
This commit is contained in:
parent
4d5b14753d
commit
adbe13938e
|
@ -14,7 +14,7 @@ set(KERNEL_SOURCES
|
|||
kernel/APIC.cpp
|
||||
kernel/CPUID.cpp
|
||||
kernel/Debug.cpp
|
||||
kernel/Device.cpp
|
||||
kernel/Device/Device.cpp
|
||||
kernel/Errors.cpp
|
||||
kernel/Font.cpp
|
||||
kernel/FS/DevFS/FileSystem.cpp
|
||||
|
|
|
@ -8,7 +8,6 @@ namespace Kernel
|
|||
class Device : public RamInode
|
||||
{
|
||||
public:
|
||||
Device(mode_t, uid_t, gid_t);
|
||||
virtual ~Device() = default;
|
||||
virtual void update() {}
|
||||
|
||||
|
@ -16,11 +15,14 @@ namespace Kernel
|
|||
virtual bool is_partition() const { return false; }
|
||||
|
||||
virtual dev_t rdev() const override = 0;
|
||||
|
||||
protected:
|
||||
Device(mode_t, uid_t, gid_t);
|
||||
};
|
||||
|
||||
class BlockDevice : public Device
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
BlockDevice(mode_t mode, uid_t uid, gid_t gid)
|
||||
: Device(Mode::IFBLK | mode, uid, gid)
|
||||
{
|
||||
|
@ -30,7 +32,7 @@ namespace Kernel
|
|||
|
||||
class CharacterDevice : public Device
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
CharacterDevice(mode_t mode, uid_t uid, gid_t gid)
|
||||
: Device(Mode::IFCHR | mode, uid, gid)
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <kernel/Device.h>
|
||||
#include <kernel/Device/Device.h>
|
||||
#include <kernel/FS/RamFS/FileSystem.h>
|
||||
|
||||
namespace Kernel
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <kernel/Device.h>
|
||||
#include <kernel/Device/Device.h>
|
||||
|
||||
namespace Kernel::Input
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <BAN/Vector.h>
|
||||
#include <kernel/Device.h>
|
||||
#include <kernel/Device/Device.h>
|
||||
#include <kernel/Storage/DiskCache.h>
|
||||
|
||||
namespace Kernel
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <BAN/Array.h>
|
||||
#include <kernel/Device.h>
|
||||
#include <kernel/Device/Device.h>
|
||||
#include <kernel/Input/KeyEvent.h>
|
||||
#include <kernel/SpinLock.h>
|
||||
#include <kernel/Terminal/TerminalDriver.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <kernel/Device.h>
|
||||
#include <kernel/Device/Device.h>
|
||||
#include <kernel/FS/DevFS/FileSystem.h>
|
||||
|
||||
namespace Kernel
|
Loading…
Reference in New Issue