mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 07:38:28 +00:00
base: buffer session args in 'Connection'
This patch is a preparation of the forthcoming async parent interface. Note that this patch increases the size of connection objects. Furthermore it adds a diagnostic message whenever a connection fails. Issue #2166
This commit is contained in:
committed by
Christian Helmuth
parent
7fba39831a
commit
82107bef9b
@ -32,11 +32,7 @@ class Genode::Rom_connection : public Connection<Rom_session>,
|
||||
|
||||
Rom_session_capability _session(Parent &parent, char const *label)
|
||||
{
|
||||
try { return session("ram_quota=4K, label=\"%s\"", label); }
|
||||
catch (...) {
|
||||
error("Could not open ROM session for \"", label, "\"");
|
||||
throw Rom_connection_failed();
|
||||
}
|
||||
return session("ram_quota=4K, label=\"%s\"", label);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -49,10 +45,14 @@ class Genode::Rom_connection : public Connection<Rom_session>,
|
||||
* \throw Rom_connection_failed
|
||||
*/
|
||||
Rom_connection(Env &env, const char *label)
|
||||
:
|
||||
try :
|
||||
Connection<Rom_session>(env, _session(env.parent(), label)),
|
||||
Rom_session_client(cap())
|
||||
{ }
|
||||
catch (...) {
|
||||
error("Could not open ROM session for \"", label, "\"");
|
||||
throw Rom_connection_failed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -62,10 +62,14 @@ class Genode::Rom_connection : public Connection<Rom_session>,
|
||||
* argument instead
|
||||
*/
|
||||
Rom_connection(const char *label)
|
||||
:
|
||||
try :
|
||||
Connection<Rom_session>(_session(*env()->parent(), label)),
|
||||
Rom_session_client(cap())
|
||||
{ }
|
||||
catch (...) {
|
||||
error("Could not open ROM session for \"", label, "\"");
|
||||
throw Rom_connection_failed();
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__ROM_SESSION__CONNECTION_H_ */
|
||||
|
Reference in New Issue
Block a user