mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-11 23:43:15 +00:00
parent
b7a379546e
commit
1d1379430a
@ -453,6 +453,7 @@ genode_usb_session::genode_usb_session(::Root & root,
|
||||
|
||||
bool ::Root::_matches(Device & d, genode_usb_session & s)
|
||||
{
|
||||
try {
|
||||
Session_policy const policy(s._label, _config.xml());
|
||||
|
||||
unsigned long vendor = policy.attribute_value<unsigned long>("vendor_id", 0);
|
||||
@ -467,6 +468,7 @@ bool ::Root::_matches(Device & d, genode_usb_session & s)
|
||||
return (vendor == d.vendor) && (product == d.product);
|
||||
if (cla)
|
||||
return (cla == d.cla) && (d.label() == s._label.last_element());
|
||||
} catch(Session_policy::No_policy_defined) {}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user