1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:27:35 +00:00

Kernel: Modernize use of pointers in VirtIO

Raw pointers were mostly replaced with smart pointers and references
where appropriate based on kling and smartcomputer7's suggestions :)

Co-authored-by: Sahan <sahan.h.fernando@gmail.com>
This commit is contained in:
Idan Horowitz 2021-04-15 19:12:06 +10:00 committed by Andreas Kling
parent ea4c9efbb9
commit 4a467c553a
6 changed files with 146 additions and 156 deletions

View file

@ -47,7 +47,7 @@ public:
virtual ~VirtIOConsole() override;
private:
virtual const char* class_name() const override { return m_class_name; }
virtual const char* class_name() const override { return m_class_name.characters(); }
virtual bool can_read(const FileDescription&, size_t) const override;
virtual KResultOr<size_t> read(FileDescription&, u64, UserOrKernelBuffer&, size_t) override;
@ -56,7 +56,7 @@ private:
virtual mode_t required_mode() const override { return 0666; }
virtual void handle_device_config_change() override;
virtual bool handle_device_config_change() override;
virtual String device_name() const override { return String::formatted("hvc{}", minor()); }
VirtIOQueue* m_receive_queue { nullptr };