mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
Kernel/VirtIO: Remove the m_class_name member
This class member was used only to determine the device type when printing messages to the debug log. Instead, remove this class member, and add a quick way to find the device type according to how the VirtIO specification says to do that. This simplifies construction of VirtIODevices a bit, because now the constructor doesn't need to ask for a String identified with the device type.
This commit is contained in:
parent
5a0aa66b73
commit
9a03c00f45
8 changed files with 56 additions and 35 deletions
|
@ -21,7 +21,7 @@ public:
|
|||
VirtIOConsole(PCI::Address);
|
||||
virtual ~VirtIOConsole() override = default;
|
||||
|
||||
virtual StringView purpose() const override { return "VirtIOConsole"; }
|
||||
virtual StringView purpose() const override { return class_name(); }
|
||||
|
||||
unsigned device_id() const
|
||||
{
|
||||
|
@ -29,6 +29,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
virtual StringView class_name() const override { return "VirtIOConsole"; }
|
||||
enum class ControlEvent : u16 {
|
||||
DeviceReady = 0,
|
||||
DeviceAdd = 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue