mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 02:01:38 +00:00
parent
5336ba4b8c
commit
9b8228d76f
@ -127,6 +127,7 @@ class Noux::Child : public Rpc_object<Session>,
|
||||
Vfs::Dir_file_system &_root_dir;
|
||||
|
||||
Vfs_io_waiter_registry &_vfs_io_waiter_registry;
|
||||
Vfs_handle_context _vfs_handle_context;
|
||||
|
||||
Destruct_queue &_destruct_queue;
|
||||
|
||||
|
@ -97,6 +97,7 @@ connect_stdio(Genode::Env &env,
|
||||
Genode::Constructible<Terminal::Connection> &terminal,
|
||||
Genode::Xml_node config,
|
||||
Vfs::Dir_file_system &root,
|
||||
Noux::Vfs_handle_context &vfs_handle_context,
|
||||
Noux::Vfs_io_waiter_registry &vfs_io_waiter_registry,
|
||||
Noux::Terminal_io_channel::Type type,
|
||||
Genode::Allocator &alloc)
|
||||
@ -143,7 +144,8 @@ connect_stdio(Genode::Env &env,
|
||||
|
||||
return *new (alloc)
|
||||
Vfs_io_channel(path.string(), root.leaf_path(path.string()), &root,
|
||||
vfs_handle, vfs_io_waiter_registry, env.ep());
|
||||
vfs_handle, vfs_handle_context,
|
||||
vfs_io_waiter_registry, env.ep());
|
||||
}
|
||||
|
||||
|
||||
@ -237,6 +239,8 @@ struct Noux::Main
|
||||
_io_response_handler,
|
||||
_global_file_system_factory };
|
||||
|
||||
Vfs_handle_context _vfs_handle_context;
|
||||
|
||||
Pid_allocator _pid_allocator;
|
||||
|
||||
Timeout_scheduler _timeout_scheduler { _env };
|
||||
@ -301,13 +305,13 @@ struct Noux::Main
|
||||
|
||||
Shared_pointer<Io_channel>
|
||||
_channel_0 { &connect_stdio(_env, _terminal, _config.xml(), _root_dir,
|
||||
_io_response_handler.io_waiter_registry,
|
||||
_vfs_handle_context, _io_response_handler.io_waiter_registry,
|
||||
Tio::STDIN, _heap), _heap },
|
||||
_channel_1 { &connect_stdio(_env, _terminal, _config.xml(), _root_dir,
|
||||
_io_response_handler.io_waiter_registry,
|
||||
_vfs_handle_context, _io_response_handler.io_waiter_registry,
|
||||
Tio::STDOUT, _heap), _heap },
|
||||
_channel_2 { &connect_stdio(_env, _terminal, _config.xml(), _root_dir,
|
||||
_io_response_handler.io_waiter_registry,
|
||||
_vfs_handle_context, _io_response_handler.io_waiter_registry,
|
||||
Tio::STDERR, _heap), _heap };
|
||||
|
||||
Main(Env &env) : _env(env)
|
||||
|
@ -240,7 +240,7 @@ bool Noux::Child::syscall(Noux::Session::Syscall sc)
|
||||
Shared_pointer<Io_channel>
|
||||
channel(new (_heap) Vfs_io_channel(_sysio.open_in.path,
|
||||
leaf_path, &_root_dir,
|
||||
vfs_handle,
|
||||
vfs_handle, _vfs_handle_context,
|
||||
_vfs_io_waiter_registry,
|
||||
_env.ep()),
|
||||
_heap);
|
||||
|
@ -62,20 +62,22 @@ struct Noux::Vfs_io_channel : Io_channel
|
||||
|
||||
Vfs::Vfs_handle *_fh;
|
||||
|
||||
Vfs_handle_context &_context;
|
||||
|
||||
Vfs_io_waiter_registry &_vfs_io_waiter_registry;
|
||||
|
||||
Absolute_path _path;
|
||||
Absolute_path _leaf_path;
|
||||
|
||||
Vfs_handle_context _context;
|
||||
|
||||
Vfs_io_channel(char const *path, char const *leaf_path,
|
||||
Vfs::Dir_file_system *root_dir, Vfs::Vfs_handle *vfs_handle,
|
||||
Vfs_handle_context &vfs_handle_context,
|
||||
Vfs_io_waiter_registry &vfs_io_waiter_registry,
|
||||
Entrypoint &ep)
|
||||
:
|
||||
_read_avail_handler(ep, *this, &Vfs_io_channel::_handle_read_avail),
|
||||
_fh(vfs_handle), _vfs_io_waiter_registry(vfs_io_waiter_registry),
|
||||
_fh(vfs_handle), _context(vfs_handle_context),
|
||||
_vfs_io_waiter_registry(vfs_io_waiter_registry),
|
||||
_path(path), _leaf_path(leaf_path)
|
||||
{
|
||||
_fh->context = &_context;
|
||||
|
Loading…
x
Reference in New Issue
Block a user