mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
vfs: add notify_read_ready() to Single_vfs_handle
The Single_file_system now forwards the `File_io_service::notify_read_ready` method to the handle as it already did for most of the other methods. genodelabs/genode#4394
This commit is contained in:
parent
f33916e2dc
commit
19958eafcf
@ -49,6 +49,8 @@ class Vfs::Single_file_system : public File_system
|
||||
}
|
||||
|
||||
virtual bool read_ready() = 0;
|
||||
|
||||
virtual bool notify_read_ready() { return true; }
|
||||
};
|
||||
|
||||
struct Single_vfs_dir_handle : Single_vfs_handle
|
||||
@ -286,6 +288,17 @@ class Vfs::Single_file_system : public File_system
|
||||
return false;
|
||||
}
|
||||
|
||||
bool notify_read_ready(Vfs_handle *vfs_handle) override
|
||||
{
|
||||
Single_vfs_handle *handle =
|
||||
static_cast<Single_vfs_handle*>(vfs_handle);
|
||||
|
||||
if (handle)
|
||||
return handle->notify_read_ready();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Ftruncate_result ftruncate(Vfs_handle *, file_size) override
|
||||
{
|
||||
return FTRUNCATE_ERR_NO_PERM;
|
||||
|
@ -137,6 +137,12 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system
|
||||
bool read_ready() override {
|
||||
return !_read_buffer.empty(); }
|
||||
|
||||
bool notify_read_ready() override
|
||||
{
|
||||
notifying = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
Read_result read(char *dst, file_size count,
|
||||
file_size &out_count) override
|
||||
{
|
||||
@ -249,17 +255,6 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system
|
||||
** File I/O service interface **
|
||||
********************************/
|
||||
|
||||
bool notify_read_ready(Vfs_handle *vfs_handle) override
|
||||
{
|
||||
Terminal_vfs_handle *handle =
|
||||
static_cast<Terminal_vfs_handle*>(vfs_handle);
|
||||
if (!handle)
|
||||
return false;
|
||||
|
||||
handle->notifying = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
Ftruncate_result ftruncate(Vfs_handle *, file_size) override
|
||||
{
|
||||
return FTRUNCATE_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user