summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-11 17:59:38 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-11 17:59:38 +0200
commite4dfb0fdf385ea830c729558f4c58091e5a16dcc (patch)
treed4cab5f4dce9ae528d49737b05020b04181e3135
parent68f22507686dfd4734ab027db9d09bd0a06dcefa (diff)
downloadserenity-e4dfb0fdf385ea830c729558f4c58091e5a16dcc.zip
Kernel: Make NetworkAdapter::class_name() return a StringView
-rw-r--r--Kernel/Net/E1000ENetworkAdapter.h2
-rw-r--r--Kernel/Net/E1000NetworkAdapter.h2
-rw-r--r--Kernel/Net/LoopbackAdapter.h2
-rw-r--r--Kernel/Net/NE2000NetworkAdapter.h2
-rw-r--r--Kernel/Net/NetworkAdapter.h2
-rw-r--r--Kernel/Net/RTL8139NetworkAdapter.h2
-rw-r--r--Kernel/Net/RTL8168NetworkAdapter.h2
7 files changed, 7 insertions, 7 deletions
diff --git a/Kernel/Net/E1000ENetworkAdapter.h b/Kernel/Net/E1000ENetworkAdapter.h
index 9289adc917..7c0b017ba0 100644
--- a/Kernel/Net/E1000ENetworkAdapter.h
+++ b/Kernel/Net/E1000ENetworkAdapter.h
@@ -32,7 +32,7 @@ public:
private:
E1000ENetworkAdapter(PCI::Address, u8 irq);
- virtual const char* class_name() const override { return "E1000ENetworkAdapter"; }
+ virtual StringView class_name() const override { return "E1000ENetworkAdapter"sv; }
virtual void detect_eeprom() override;
virtual u32 read_eeprom(u8 address) override;
diff --git a/Kernel/Net/E1000NetworkAdapter.h b/Kernel/Net/E1000NetworkAdapter.h
index 74dc5106b2..33a126dceb 100644
--- a/Kernel/Net/E1000NetworkAdapter.h
+++ b/Kernel/Net/E1000NetworkAdapter.h
@@ -37,7 +37,7 @@ protected:
E1000NetworkAdapter(PCI::Address, u8 irq);
virtual bool handle_irq(const RegisterState&) override;
- virtual const char* class_name() const override { return "E1000NetworkAdapter"; }
+ virtual StringView class_name() const override { return "E1000NetworkAdapter"sv; }
struct [[gnu::packed]] e1000_rx_desc {
volatile uint64_t addr { 0 };
diff --git a/Kernel/Net/LoopbackAdapter.h b/Kernel/Net/LoopbackAdapter.h
index b7949793db..d02fe147be 100644
--- a/Kernel/Net/LoopbackAdapter.h
+++ b/Kernel/Net/LoopbackAdapter.h
@@ -21,7 +21,7 @@ public:
virtual ~LoopbackAdapter() override;
virtual void send_raw(ReadonlyBytes) override;
- virtual const char* class_name() const override { return "LoopbackAdapter"; }
+ virtual StringView class_name() const override { return "LoopbackAdapter"; }
};
}
diff --git a/Kernel/Net/NE2000NetworkAdapter.h b/Kernel/Net/NE2000NetworkAdapter.h
index cb58071f63..3d4d74960e 100644
--- a/Kernel/Net/NE2000NetworkAdapter.h
+++ b/Kernel/Net/NE2000NetworkAdapter.h
@@ -30,7 +30,7 @@ public:
private:
NE2000NetworkAdapter(PCI::Address, u8 irq);
virtual bool handle_irq(const RegisterState&) override;
- virtual const char* class_name() const override { return "NE2000NetworkAdapter"; }
+ virtual StringView class_name() const override { return "NE2000NetworkAdapter"sv; }
int ram_test();
void reset();
diff --git a/Kernel/Net/NetworkAdapter.h b/Kernel/Net/NetworkAdapter.h
index 945c40784c..2a6b192f7d 100644
--- a/Kernel/Net/NetworkAdapter.h
+++ b/Kernel/Net/NetworkAdapter.h
@@ -44,7 +44,7 @@ class NetworkAdapter : public RefCounted<NetworkAdapter>
public:
virtual ~NetworkAdapter();
- virtual const char* class_name() const = 0;
+ virtual StringView class_name() const = 0;
const String& name() const { return m_name; }
MACAddress mac_address() { return m_mac_address; }
diff --git a/Kernel/Net/RTL8139NetworkAdapter.h b/Kernel/Net/RTL8139NetworkAdapter.h
index 8ab694e66a..164fbb0c77 100644
--- a/Kernel/Net/RTL8139NetworkAdapter.h
+++ b/Kernel/Net/RTL8139NetworkAdapter.h
@@ -32,7 +32,7 @@ public:
private:
RTL8139NetworkAdapter(PCI::Address, u8 irq);
virtual bool handle_irq(const RegisterState&) override;
- virtual const char* class_name() const override { return "RTL8139NetworkAdapter"; }
+ virtual StringView class_name() const override { return "RTL8139NetworkAdapter"sv; }
void reset();
void read_mac_address();
diff --git a/Kernel/Net/RTL8168NetworkAdapter.h b/Kernel/Net/RTL8168NetworkAdapter.h
index 079fad897c..0066e8d23b 100644
--- a/Kernel/Net/RTL8168NetworkAdapter.h
+++ b/Kernel/Net/RTL8168NetworkAdapter.h
@@ -37,7 +37,7 @@ private:
RTL8168NetworkAdapter(PCI::Address, u8 irq);
virtual bool handle_irq(const RegisterState&) override;
- virtual const char* class_name() const override { return "RTL8168NetworkAdapter"; }
+ virtual StringView class_name() const override { return "RTL8168NetworkAdapter"sv; }
struct [[gnu::packed]] TXDescriptor {
volatile u16 frame_length; // top 2 bits are reserved