Skip to content

Commit

Permalink
Kernel: Move devices into Kernel/Devices/.
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Apr 3, 2019
1 parent 072ea7e commit ab43658
Show file tree
Hide file tree
Showing 42 changed files with 53 additions and 54 deletions.
5 changes: 0 additions & 5 deletions Kernel/BlockDevice.cpp

This file was deleted.

5 changes: 0 additions & 5 deletions Kernel/CharacterDevice.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion Kernel/Console.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <AK/CircularQueue.h>
#include <AK/Vector.h>
#include <Kernel/CharacterDevice.h>
#include <Kernel/Devices/CharacterDevice.h>

class ConsoleImplementation {
public:
Expand Down
2 changes: 1 addition & 1 deletion Kernel/BXVGADevice.cpp → Kernel/Devices/BXVGADevice.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <Kernel/BXVGADevice.h>
#include <Kernel/Devices/BXVGADevice.h>
#include <Kernel/IO.h>
#include <Kernel/PCI.h>
#include <Kernel/MemoryManager.h>
Expand Down
2 changes: 1 addition & 1 deletion Kernel/BXVGADevice.h → Kernel/Devices/BXVGADevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <AK/AKString.h>
#include <SharedGraphics/Size.h>
#include <Kernel/types.h>
#include <Kernel/BlockDevice.h>
#include <Kernel/Devices/BlockDevice.h>

class BXVGADevice final : public BlockDevice {
AK_MAKE_ETERNAL
Expand Down
5 changes: 5 additions & 0 deletions Kernel/Devices/BlockDevice.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <Kernel/Devices/BlockDevice.h>

BlockDevice::~BlockDevice()
{
}
2 changes: 1 addition & 1 deletion Kernel/BlockDevice.h → Kernel/Devices/BlockDevice.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <Kernel/Device.h>
#include <Kernel/Devices/Device.h>

class BlockDevice : public Device {
public:
Expand Down
5 changes: 5 additions & 0 deletions Kernel/Devices/CharacterDevice.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <Kernel/Devices/CharacterDevice.h>

CharacterDevice::~CharacterDevice()
{
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <Kernel/Device.h>
#include <Kernel/Devices/Device.h>

class CharacterDevice : public Device {
public:
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Kernel/DiskDevice.cpp → Kernel/Devices/DiskDevice.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "DiskDevice.h"
#include <Kernel/Devices/DiskDevice.h>

DiskDevice::DiskDevice()
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define _FILE_OFFSET_BITS 64

#include "FileBackedDiskDevice.h"
#include <Kernel/Devices/FileBackedDiskDevice.h>
#include <cstring>
#include <sys/stat.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "DiskDevice.h"
#include <Kernel/Devices/DiskDevice.h>
#include <AK/RetainPtr.h>
#include <AK/AKString.h>
#include <AK/Types.h>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Kernel/IDEDiskDevice.h → Kernel/Devices/IDEDiskDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <Kernel/Lock.h>
#include <AK/RetainPtr.h>
#include <Kernel/DiskDevice.h>
#include <Kernel/Devices/DiskDevice.h>
#include "IRQHandler.h"

class IDEDiskDevice final : public IRQHandler, public DiskDevice {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "i386.h"
#include "IO.h"
#include "PIC.h"
#include "KeyboardDevice.h"
#include <Kernel/Devices/KeyboardDevice.h>
#include <Kernel/TTY/VirtualConsole.h>
#include <AK/Assertions.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <AK/Types.h>
#include <AK/DoublyLinkedList.h>
#include <AK/CircularQueue.h>
#include <Kernel/CharacterDevice.h>
#include <Kernel/Devices/CharacterDevice.h>
#include "IRQHandler.h"
#include "KeyCode.h"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <Kernel/CharacterDevice.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/MousePacket.h>
#include <Kernel/IRQHandler.h>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions Kernel/FileDescriptor.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "FileDescriptor.h"
#include <Kernel/FileSystem/FileSystem.h>
#include "CharacterDevice.h"
#include <Kernel/Devices/CharacterDevice.h>
#include <LibC/errno_numbers.h>
#include "UnixTypes.h"
#include <AK/BufferStream.h>
Expand All @@ -9,7 +9,7 @@
#include <Kernel/TTY/MasterPTY.h>
#include <Kernel/Socket.h>
#include <Kernel/Process.h>
#include <Kernel/BlockDevice.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/MemoryManager.h>

Retained<FileDescriptor> FileDescriptor::create(RetainPtr<Inode>&& inode)
Expand Down
2 changes: 1 addition & 1 deletion Kernel/FileSystem/FileSystem.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "DiskDevice.h"
#include <Kernel/Devices/DiskDevice.h>
#include "InodeIdentifier.h"
#include "InodeMetadata.h"
#include "Limits.h"
Expand Down
2 changes: 1 addition & 1 deletion Kernel/FileSystem/VirtualFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "FileSystem.h"
#include <AK/FileSystemPath.h>
#include <AK/StringBuilder.h>
#include "CharacterDevice.h"
#include <Kernel/Devices/CharacterDevice.h>
#include <LibC/errno_numbers.h>
#include <Kernel/Process.h>

Expand Down
24 changes: 12 additions & 12 deletions Kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ KERNEL_OBJS = \
Process.o \
Thread.o \
i8253.o \
KeyboardDevice.o \
Devices/KeyboardDevice.o \
CMOS.o \
PIC.o \
Syscall.o \
IDEDiskDevice.o \
Devices/IDEDiskDevice.o \
MemoryManager.o \
Console.o \
IRQHandler.o \
Expand All @@ -28,9 +28,9 @@ KERNEL_OBJS = \
ELF/ELFLoader.o \
KSyms.o \
FileSystem/DevPtsFS.o \
BXVGADevice.o \
Devices/BXVGADevice.o \
PCI.o \
PS2MouseDevice.o \
Devices/PS2MouseDevice.o \
Socket.o \
LocalSocket.o \
Net/IPv4Socket.o \
Expand All @@ -44,14 +44,14 @@ KERNEL_OBJS = \

VFS_OBJS = \
FileSystem/ProcFS.o \
DiskDevice.o \
Device.o \
CharacterDevice.o \
BlockDevice.o \
NullDevice.o \
FullDevice.o \
ZeroDevice.o \
RandomDevice.o \
Devices/DiskDevice.o \
Devices/Device.o \
Devices/CharacterDevice.o \
Devices/BlockDevice.o \
Devices/NullDevice.o \
Devices/FullDevice.o \
Devices/ZeroDevice.o \
Devices/RandomDevice.o \
FileSystem/FileSystem.o \
FileSystem/DiskBackedFileSystem.o \
FileSystem/Ext2FileSystem.o \
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Net/TCPSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/Net/Routing.h>
#include <Kernel/Process.h>
#include <Kernel/RandomDevice.h>
#include <Kernel/Devices/RandomDevice.h>

Lockable<HashMap<word, TCPSocket*>>& TCPSocket::sockets_by_port()
{
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Net/UDPSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <Kernel/Net/UDP.h>
#include <Kernel/Net/NetworkAdapter.h>
#include <Kernel/Process.h>
#include <Kernel/RandomDevice.h>
#include <Kernel/Devices/RandomDevice.h>
#include <Kernel/Net/Routing.h>

Lockable<HashMap<word, UDPSocket*>>& UDPSocket::sockets_by_port()
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "system.h"
#include <Kernel/FileDescriptor.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/NullDevice.h>
#include <Kernel/Devices/NullDevice.h>
#include <Kernel/ELF/ELFLoader.h>
#include "MemoryManager.h"
#include "i8253.h"
Expand Down
2 changes: 1 addition & 1 deletion Kernel/TTY/MasterPTY.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <AK/Badge.h>
#include <Kernel/CharacterDevice.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/DoubleBuffer.h>

class SlavePTY;
Expand Down
2 changes: 1 addition & 1 deletion Kernel/TTY/PTYMultiplexer.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <Kernel/CharacterDevice.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <AK/Badge.h>
#include <Kernel/Lock.h>

Expand Down
2 changes: 1 addition & 1 deletion Kernel/TTY/TTY.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "DoubleBuffer.h"
#include <Kernel/CharacterDevice.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/UnixTypes.h>

class Process;
Expand Down
1 change: 0 additions & 1 deletion Kernel/TTY/VirtualConsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "i386.h"
#include "IO.h"
#include "StdLib.h"
#include "KeyboardDevice.h"
#include <AK/AKString.h>

static byte* s_vga_buffer;
Expand Down
2 changes: 1 addition & 1 deletion Kernel/TTY/VirtualConsole.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <Kernel/TTY/TTY.h>
#include "KeyboardDevice.h"
#include <Kernel/Devices/KeyboardDevice.h>
#include "Console.h"

class VirtualConsole final : public TTY, public KeyboardClient, public ConsoleImplementation {
Expand Down
16 changes: 8 additions & 8 deletions Kernel/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
#include "kmalloc.h"
#include "i386.h"
#include "i8253.h"
#include "KeyboardDevice.h"
#include <Kernel/Devices/KeyboardDevice.h>
#include "Process.h"
#include "system.h"
#include "PIC.h"
#include "IDEDiskDevice.h"
#include <Kernel/Devices/IDEDiskDevice.h>
#include "KSyms.h"
#include <Kernel/NullDevice.h>
#include <Kernel/ZeroDevice.h>
#include <Kernel/FullDevice.h>
#include <Kernel/RandomDevice.h>
#include <Kernel/Devices/NullDevice.h>
#include <Kernel/Devices/ZeroDevice.h>
#include <Kernel/Devices/FullDevice.h>
#include <Kernel/Devices/RandomDevice.h>
#include <Kernel/FileSystem/Ext2FileSystem.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include "MemoryManager.h"
#include <Kernel/FileSystem/ProcFS.h>
#include "RTC.h"
#include <Kernel/TTY/VirtualConsole.h>
#include "Scheduler.h"
#include "PS2MouseDevice.h"
#include <Kernel/Devices/PS2MouseDevice.h>
#include <Kernel/TTY/PTYMultiplexer.h>
#include <Kernel/FileSystem/DevPtsFS.h>
#include "BXVGADevice.h"
#include <Kernel/Devices/BXVGADevice.h>
#include <Kernel/Net/E1000NetworkAdapter.h>
#include <Kernel/Net/NetworkTask.h>

Expand Down

0 comments on commit ab43658

Please sign in to comment.