summaryrefslogtreecommitdiff
path: root/Kernel/Bus/VirtIO/VirtIOConsolePort.h
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2021-08-27 12:18:13 +0300
committerAndreas Kling <kling@serenityos.org>2021-08-31 16:51:13 +0200
commite418740645c2ac28d725c859ba07df0d76b3aab8 (patch)
tree15cb05096a32cc31f4bb5b699521b128ba9a6426 /Kernel/Bus/VirtIO/VirtIOConsolePort.h
parent9a03c00f45a7e829d9ff851ec9c1a8cbfe697280 (diff)
downloadserenity-e418740645c2ac28d725c859ba07df0d76b3aab8.zip
Kernel/VirtIO: Move everything into the VirtIO namespace
Before of this change, many specific classes to VirtIO were in the Kernel namespace, which polluted it. Everything should be more organized now, but there's still room for improvement later.
Diffstat (limited to 'Kernel/Bus/VirtIO/VirtIOConsolePort.h')
-rw-r--r--Kernel/Bus/VirtIO/VirtIOConsolePort.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Kernel/Bus/VirtIO/VirtIOConsolePort.h b/Kernel/Bus/VirtIO/VirtIOConsolePort.h
index 3f863d144c..d2b9709bb3 100644
--- a/Kernel/Bus/VirtIO/VirtIOConsolePort.h
+++ b/Kernel/Bus/VirtIO/VirtIOConsolePort.h
@@ -12,21 +12,21 @@
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Memory/RingBuffer.h>
-namespace Kernel {
+namespace Kernel::VirtIO {
-class VirtIOConsole;
+class Console;
#define VIRTIO_CONSOLE_F_SIZE (1 << 0)
#define VIRTIO_CONSOLE_F_MULTIPORT (1 << 1)
#define VIRTIO_CONSOLE_F_EMERG_WRITE (1 << 2)
-class VirtIOConsolePort
+class ConsolePort
: public CharacterDevice {
public:
- explicit VirtIOConsolePort(unsigned port, VirtIOConsole&);
- void handle_queue_update(Badge<VirtIOConsole>, u16 queue_index);
+ explicit ConsolePort(unsigned port, VirtIO::Console&);
+ void handle_queue_update(Badge<VirtIO::Console>, u16 queue_index);
- void set_open(Badge<VirtIOConsole>, bool state) { m_open = state; }
+ void set_open(Badge<VirtIO::Console>, bool state) { m_open = state; }
bool is_open() const { return m_open; }
private:
@@ -53,7 +53,7 @@ private:
OwnPtr<Memory::RingBuffer> m_receive_buffer;
OwnPtr<Memory::RingBuffer> m_transmit_buffer;
- VirtIOConsole& m_console;
+ VirtIO::Console& m_console;
unsigned m_port;
bool m_open { false };