mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
Kernel: Have File virtuals take a FileDescriptor& rather than a Process&.
This will allow us to implement different behaviors depending on the role of the descriptor a File is being accessed through.
This commit is contained in:
parent
3761bc3ed7
commit
8cbb7f101f
Notes:
sideshowbarker
2024-07-19 14:32:46 +09:00
Author: https://github.com/awesomekling
Commit: 8cbb7f101f
39 changed files with 156 additions and 155 deletions
|
@ -19,10 +19,10 @@ public:
|
|||
virtual ~Console() override;
|
||||
|
||||
// ^CharacterDevice
|
||||
virtual bool can_read(Process&) const override;
|
||||
virtual bool can_write(Process&) const override { return true; }
|
||||
virtual ssize_t read(Process&, byte*, ssize_t) override;
|
||||
virtual ssize_t write(Process&, const byte*, ssize_t) override;
|
||||
virtual bool can_read(FileDescriptor&) const override;
|
||||
virtual bool can_write(FileDescriptor&) const override { return true; }
|
||||
virtual ssize_t read(FileDescriptor&, byte*, ssize_t) override;
|
||||
virtual ssize_t write(FileDescriptor&, const byte*, ssize_t) override;
|
||||
virtual const char* class_name() const override { return "Console"; }
|
||||
|
||||
void set_implementation(ConsoleImplementation* implementation) { m_implementation = implementation; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue