From 94d991277f27c8ad75e5ee703cd5d2c2e5ba20e4 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 18 Jan 2017 09:29:52 +0100 Subject: [PATCH] launchpad: distinguish unique name from elf name This patch re-enables the launchpad to start multiple instances of the same program. Without it, launchpad wrongly requests the binary ROM with the child's unique name as label. The lookup of the first instance solely succeeds because the unique name equals the binary name. --- repos/demo/include/launchpad/launchpad.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/repos/demo/include/launchpad/launchpad.h b/repos/demo/include/launchpad/launchpad.h index 659bdee116..6195847844 100644 --- a/repos/demo/include/launchpad/launchpad.h +++ b/repos/demo/include/launchpad/launchpad.h @@ -47,6 +47,8 @@ class Launchpad_child : public Genode::Child_policy, Name const _name; + Binary_name const _elf_name; + Genode::Env &_env; Genode::Ram_session_capability _ref_ram_cap; @@ -87,13 +89,13 @@ class Launchpad_child : public Genode::Child_policy, Launchpad_child(Genode::Env &env, Genode::Session_label const &label, - Name const &elf_name, + Binary_name const &elf_name, Genode::size_t ram_quota, Parent_services &parent_services, Child_services &child_services, Genode::Dataspace_capability config_ds) : - _name(label), + _name(label), _elf_name(elf_name), _env(env), _ref_ram_cap(env.ram_session_cap()), _ram_quota(ram_quota), _parent_services(parent_services), _child_services(child_services), @@ -120,6 +122,8 @@ class Launchpad_child : public Genode::Child_policy, Name name() const override { return _name; } + Binary_name binary_name() const override { return _elf_name; } + Genode::Ram_session &ref_ram() override { return _ref_ram; } Genode::Ram_session_capability ref_ram_cap() const override { return _ref_ram_cap; }