mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
os: let empty label prefix/suffix match
This patch changes the 'Xml_node_label_score' to regard an empty label_prefix or label_suffix as a match instead of a conflict. Until now, there was no use case for an empty label_prefix. But with init's new ability to route environment sessions, an empty prefix denotes any child-initiated session (as oposed to an parent-initiated environment session). Issue #2215 Issue #2233
This commit is contained in:
parent
9006b7ea6a
commit
c1e399025e
@ -64,7 +64,7 @@ struct Genode::Xml_node_label_score
|
||||
Prefix const prefix = node.attribute_value("label_prefix", Prefix());
|
||||
|
||||
if (!strcmp(label.string(), prefix.string(), prefix.length() - 1))
|
||||
prefix_match = prefix.length()-1;
|
||||
prefix_match = prefix.length();
|
||||
}
|
||||
|
||||
if (suffix_present) {
|
||||
@ -75,7 +75,7 @@ struct Genode::Xml_node_label_score
|
||||
unsigned const offset = label.length() - suffix.length();
|
||||
|
||||
if (!strcmp(label.string() + offset, suffix.string()))
|
||||
suffix_match = suffix.length()-1;
|
||||
suffix_match = suffix.length();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user