mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-22 12:06:00 +00:00
Deprecate policy constructor with implicit config
because it uses the deprecated config library. Issue #1987
This commit is contained in:
parent
dde11de008
commit
e49bb4943e
@ -211,9 +211,7 @@ class Genode::Session_policy : public Xml_node
|
||||
* Constructor
|
||||
*
|
||||
* \param label label used as the selector of a policy
|
||||
* \param config XML node that contains the policies as sub nodes,
|
||||
* using the component's top-level config node by
|
||||
* default
|
||||
* \param config XML node that contains the policies as sub nodes
|
||||
*
|
||||
* \throw No_policy_defined the server configuration has no
|
||||
* policy defined for the specified label
|
||||
@ -227,11 +225,24 @@ class Genode::Session_policy : public Xml_node
|
||||
* with the longest label is selected.
|
||||
*/
|
||||
template <size_t N>
|
||||
explicit Session_policy(String<N> const &label,
|
||||
Xml_node config = Genode::config()->xml_node())
|
||||
Session_policy(String<N> const &label, Xml_node config)
|
||||
:
|
||||
Xml_node(_query_policy(label, config))
|
||||
{ }
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* \param label label used as the selector of a policy
|
||||
*
|
||||
* \deprecated use constructor with explicit 'config' argument
|
||||
*/
|
||||
template <size_t N> explicit Session_policy(String<N> const &label) __attribute__((deprecated));
|
||||
};
|
||||
|
||||
template <Genode::size_t N> Genode::Session_policy::Session_policy(String<N> const &label)
|
||||
:
|
||||
Xml_node(_query_policy(label, Genode::config()->xml_node()))
|
||||
{ }
|
||||
|
||||
#endif /* _INCLUDE__OS__SESSION_POLICY_H_ */
|
||||
|
@ -205,7 +205,7 @@ class Platform::Session_component : public Genode::Rpc_object<Session>
|
||||
Genode::Region_map &_local_rm;
|
||||
Genode::Heap _md_alloc;
|
||||
Genode::Session_label const _label;
|
||||
Genode::Session_policy const _policy { _label };
|
||||
Genode::Session_policy const _policy { _label, _config.xml() };
|
||||
Genode::List<Device_component> _device_list;
|
||||
Platform::Pci_buses &_pci_bus;
|
||||
Genode::Heap &_global_heap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user