diff --git a/run/abuse.run b/run/abuse.run index 8275475..5d70693 100644 --- a/run/abuse.run +++ b/run/abuse.run @@ -128,6 +128,7 @@ set boot_modules { ld.lib.so libc.lib.so libm.lib.so + posix.lib.so libpng.lib.so pthread.lib.so sdl_image.lib.so diff --git a/run/chocolate-doom.run b/run/chocolate-doom.run index 169a22e..2e2b307 100644 --- a/run/chocolate-doom.run +++ b/run/chocolate-doom.run @@ -188,7 +188,7 @@ set boot_modules { core init timer tar_fs chocolate-doom ld.lib.so - libc.lib.so libm.lib.so sdl.lib.so sdl_net.lib.so + libc.lib.so posix.lib.so libm.lib.so sdl.lib.so sdl_net.lib.so sdl_mixer.lib.so pthread.lib.so data.tar } diff --git a/run/chroot.run b/run/chroot.run index ffc0662..49da752 100644 --- a/run/chroot.run +++ b/run/chroot.run @@ -112,7 +112,7 @@ install_config $config build_boot_image { core init vfs chroot - ld.lib.so libc.lib.so libm.lib.so + ld.lib.so libc.lib.so libm.lib.so posix.lib.so test-libc } diff --git a/run/eigentor.run b/run/eigentor.run index b0c832d..71c0a3d 100644 --- a/run/eigentor.run +++ b/run/eigentor.run @@ -200,6 +200,7 @@ set boot_modules { init ld.lib.so libc.lib.so + posix.lib.so libcrypto.lib.so libevent.lib.so libm.lib.so diff --git a/run/glucose.run b/run/glucose.run index 132d2f6..71a2f50 100644 --- a/run/glucose.run +++ b/run/glucose.run @@ -75,10 +75,7 @@ install_config $config build_boot_image { core init test-glucose timer - ld.lib.so libc.lib.so - libm.lib.so - stdcxx.lib.so - zlib.lib.so + ld.lib.so libc.lib.so posix.lib.so libm.lib.so stdcxx.lib.so zlib.lib.so Test.cnf } diff --git a/run/grafx2.run b/run/grafx2.run index 0f11510..5769bc4 100644 --- a/run/grafx2.run +++ b/run/grafx2.run @@ -119,6 +119,7 @@ set boot_modules { ld.lib.so libc.lib.so libm.lib.so + posix.lib.so libpng.lib.so pthread.lib.so sdl_image.lib.so diff --git a/run/lemon.run b/run/lemon.run index d26ac21..2e03cd1 100644 --- a/run/lemon.run +++ b/run/lemon.run @@ -31,9 +31,7 @@ install_config { build_boot_image { core init test-lemon - ld.lib.so libc.lib.so - libm.lib.so - stdcxx.lib.so + ld.lib.so libc.lib.so posix.lib.so libm.lib.so stdcxx.lib.so } append qemu_args " -nographic " diff --git a/run/ltris.run b/run/ltris.run index 22f31c1..1633dd2 100644 --- a/run/ltris.run +++ b/run/ltris.run @@ -30,6 +30,7 @@ set boot_modules { ram_fs ltris libc.lib.so + posix.lib.so libm.lib.so pthread.lib.so sdl_mixer.lib.so diff --git a/run/numptyphysics.run b/run/numptyphysics.run index 49c6305..a5b69de 100644 --- a/run/numptyphysics.run +++ b/run/numptyphysics.run @@ -29,6 +29,7 @@ set boot_modules { freetype.lib.so jpeg.lib.so libc.lib.so + posix.lib.so libm.lib.so libpng.lib.so pthread.lib.so diff --git a/run/rom_fallback.run b/run/rom_fallback.run index 76e68eb..0f8adeb 100644 --- a/run/rom_fallback.run +++ b/run/rom_fallback.run @@ -76,8 +76,7 @@ install_config $config # generic modules set boot_modules { core init ld.lib.so - libc.lib.so - libm.lib.so + libc.lib.so libm.lib.so posix.lib.so report_rom rom_fallback test-libc diff --git a/run/scip.run b/run/scip.run index a2d6af5..05f319e 100644 --- a/run/scip.run +++ b/run/scip.run @@ -34,7 +34,7 @@ install_config { build_boot_image { core init test-scip - ld.lib.so libc.lib.so libm.lib.so + ld.lib.so libc.lib.so libm.lib.so posix.lib.so stdcxx.lib.so soplex.lib.so zlib.lib.so gmp.lib.so scip.lib.so } diff --git a/run/soplex.run b/run/soplex.run index 0854868..51bc5ee 100644 --- a/run/soplex.run +++ b/run/soplex.run @@ -31,7 +31,7 @@ install_config { build_boot_image { core init test-soplex - ld.lib.so libc.lib.so libm.lib.so + ld.lib.so libc.lib.so libm.lib.so posix.lib.so stdcxx.lib.so soplex.lib.so zlib.lib.so gmp.lib.so } diff --git a/run/supertux.run b/run/supertux.run index 52b7471..d267c07 100644 --- a/run/supertux.run +++ b/run/supertux.run @@ -26,6 +26,7 @@ set boot_modules { supertux jpeg.lib.so libc.lib.so + posix.lib.so libm.lib.so libpng.lib.so pthread.lib.so diff --git a/run/tor_lx.run b/run/tor_lx.run index b67cde2..51cceeb 100644 --- a/run/tor_lx.run +++ b/run/tor_lx.run @@ -132,7 +132,7 @@ install_config $config # generic modules set boot_modules { core init timer rtc_drv - ld.lib.so libc.lib.so libm.lib.so zlib.lib.so + ld.lib.so libc.lib.so libm.lib.so zlib.lib.so posix.lib.so libcrypto.lib.so libevent.lib.so libssl.lib.so pthread.lib.so vfs_jitterentropy.lib.so lwip.lib.so nic_drv ram_fs tor diff --git a/run/tuxmath.run b/run/tuxmath.run index 9c88996..f71bb2b 100644 --- a/run/tuxmath.run +++ b/run/tuxmath.run @@ -16,6 +16,7 @@ set app_config { set boot_modules { tuxmath libc.lib.so + posix.lib.so libm.lib.so pthread.lib.so libiconv.lib.so diff --git a/run/tyrian.run b/run/tyrian.run index 4e068f3..20a7c15 100644 --- a/run/tyrian.run +++ b/run/tyrian.run @@ -127,6 +127,7 @@ append boot_modules { ld.lib.so libc.lib.so libm.lib.so + posix.lib.so libpng.lib.so pthread.lib.so posix.lib.so diff --git a/run/tyrquake.run b/run/tyrquake.run index d90a287..0e7b6f3 100644 --- a/run/tyrquake.run +++ b/run/tyrquake.run @@ -233,4 +233,4 @@ append qemu_args " -soundhw es1370 " run_genode_until forever -rm bin/variables \ No newline at end of file +rm bin/variables diff --git a/run/uhexen2.run b/run/uhexen2.run index 31e53e2..7676b13 100644 --- a/run/uhexen2.run +++ b/run/uhexen2.run @@ -183,7 +183,7 @@ set boot_modules { usb_drv uhexen2 ld.lib.so - libc.lib.so + libc.lib.so posix.lib.so libm.lib.so lwip.lib.so sdl.lib.so sdl_mixer.lib.so pthread.lib.so hexen2demo_data.tar } diff --git a/src/proxy/rom_verify/main.cc b/src/proxy/rom_verify/main.cc index 50cd8b1..10796c1 100644 --- a/src/proxy/rom_verify/main.cc +++ b/src/proxy/rom_verify/main.cc @@ -242,7 +242,6 @@ void Rom_hash::Main::handle_session_request(Xml_node request) String<64> args("ram_quota=", ram_quota); - // XXX handle Root::Invalid_args env.upgrade(session.client_id.id(), args.string()); env.parent().session_response(server_id, Parent::SESSION_OK); }); diff --git a/src/server/chroot/component.cc b/src/server/chroot/component.cc index 2ee9d4b..553a4f6 100644 --- a/src/server/chroot/component.cc +++ b/src/server/chroot/component.cc @@ -233,7 +233,7 @@ void Chroot::Main::handle_session_request(Xml_node request) catch (...) { if (session) destroy(heap, session); - env.parent().session_response(server_id, Parent::INVALID_ARGS); + env.parent().session_response(server_id, Parent::SERVICE_DENIED); } } @@ -245,7 +245,6 @@ void Chroot::Main::handle_session_request(Xml_node request) String<64> args("ram_quota=", ram_quota); - // XXX handle Root::Invalid_args env.upgrade(session.client_id.id(), args.string()); env.parent().session_response(server_id, Parent::SESSION_OK); }); diff --git a/src/server/log_tee/component.cc b/src/server/log_tee/component.cc index f464419..20fc41f 100644 --- a/src/server/log_tee/component.cc +++ b/src/server/log_tee/component.cc @@ -75,9 +75,7 @@ class Log_tee::Root_component : Log_tee::Session_component *_create_session(char const *args) override { Session_label const label = label_from_args(args); - - try { return new (md_alloc()) Session_component(_env, label, args); } - catch (Genode::Parent::Service_denied) { throw Root::Unavailable(); } + return new (md_alloc()) Session_component(_env, label, args); } public: diff --git a/src/server/lz_rom/main.cc b/src/server/lz_rom/main.cc index 56a1f14..d904f88 100644 --- a/src/server/lz_rom/main.cc +++ b/src/server/lz_rom/main.cc @@ -307,7 +307,7 @@ void Lz_rom::Main::handle_session_request(Xml_node request) } error("failed to decompress '", lz_path, "', ", msg); } catch (...) { } - env.parent().session_response(server_id, Parent::INVALID_ARGS); + env.parent().session_response(server_id, Parent::SERVICE_DENIED); } if (request.has_type("close")) { diff --git a/src/server/rom_fallback/component.cc b/src/server/rom_fallback/component.cc index 270e622..f01720a 100644 --- a/src/server/rom_fallback/component.cc +++ b/src/server/rom_fallback/component.cc @@ -167,35 +167,32 @@ void Rom_fallback::Main::handle_session_request(Xml_node request) return; } - catch (Parent::Service_denied) { + catch (Service_denied) { warning("'", new_label, "' was denied"); } - catch (Service::Unavailable) { - warning("'", new_label, "' is unavailable"); } + catch (Insufficient_ram_quota) { + warning("'", new_label, "' RAM quota donation was insufficient"); } - catch (Service::Invalid_args) { - warning("'", new_label, "' received invalid args"); } - - catch (Service::Quota_exceeded) { - warning("'", new_label, "' quota donation was insufficient"); } + catch (Insufficient_cap_quota) { + warning("'", new_label, "' cap quota donation was insufficient"); } if (session) destroy(heap, session); } error("no service found for ROM '", original.string(), "'"); - env.parent().session_response(server_id, Parent::INVALID_ARGS); + env.parent().session_response(server_id, Parent::SERVICE_DENIED); } if (request.has_type("upgrade")) { server_id_space.apply(server_id, [&] (Session &session) { - size_t ram_quota = request.attribute_value("ram_quota", 0UL); + Ram_quota ram_quota { request.attribute_value("ram_quota", 0UL) }; + Cap_quota cap_quota { request.attribute_value("cap_quota", 0UL) }; - String<64> args("ram_quota=", ram_quota); + String<80> args("ram_quota=", ram_quota, ", cap_quota=", cap_quota); - // XXX handle Root::Invalid_args env.upgrade(session.client_id.id(), args.string()); env.parent().session_response(server_id, Parent::SESSION_OK); }); @@ -217,4 +214,4 @@ void Component::construct(Genode::Env &env) static Rom_fallback::Main inst(env); env.parent().announce("ROM"); -} \ No newline at end of file +} diff --git a/src/server/tftp_rom/component.cc b/src/server/tftp_rom/component.cc index e65915b..bb7289e 100644 --- a/src/server/tftp_rom/component.cc +++ b/src/server/tftp_rom/component.cc @@ -142,7 +142,7 @@ class Tftp_rom::Session_component : { if (_pcb == NULL) { Genode::error("failed to create UDP context"); - throw Genode::Root::Unavailable(); + throw Genode::Service_denied(); } /* set callback */ @@ -477,7 +477,7 @@ class Tftp_rom::Root : public Genode::Root_component ipaddr_aton(addr_str, &ipaddr); } catch (...) { Genode::error(label.string(), ": 'ip' not specified in policy"); - throw Root::Unavailable(); + throw Service_denied(); } try { policy.attribute("port").value(&port); } @@ -503,10 +503,10 @@ class Tftp_rom::Root : public Genode::Root_component _timeout_dispatcher.elapsed_ms(), timeout*1000); Genode::log(label.string(), " requested"); } - - } catch (Session_policy::No_policy_defined) { + } + catch (Session_policy::No_policy_defined) { Genode::error("no policy for defined for ", label.string()); - throw Root::Unavailable(); + throw Service_denied(); } _timeout_dispatcher.insert(session); @@ -531,7 +531,7 @@ class Tftp_rom::Root : public Genode::Root_component }; -void Libc::Component::construct(Genode::Env &env ) +void Libc::Component::construct(Libc::Env &env ) { static Genode::Sliced_heap sliced_heap(env.ram(), env.rm()); static Tftp_rom::Root root(env, sliced_heap);