Kernel: Make NetworkAdapter::class_name() return a StringView

This commit is contained in:
Andreas Kling 2021-07-11 17:59:38 +02:00
parent 68f2250768
commit e4dfb0fdf3
Notes: sideshowbarker 2024-07-18 09:19:17 +09:00
7 changed files with 7 additions and 7 deletions

View file

@ -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;

View file

@ -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 };

View file

@ -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"; }
};
}

View file

@ -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();

View file

@ -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; }

View file

@ -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();

View file

@ -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