[Pdbg] [PATCH 1/3] path: Match targets with dn name correctly
Amitay Isaacs
amitay at ozlabs.org
Thu Mar 14 17:44:47 AEDT 2019
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
src/path.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/path.c b/src/path.c
index 0141085..a745838 100644
--- a/src/path.c
+++ b/src/path.c
@@ -241,12 +241,14 @@ static void path_pattern_match(struct pdbg_target *target,
if (!classname)
goto end;
- safe_strcpy(comp_name, sizeof(comp_name), classname);
if (pats[level].match_full) {
- tok = comp_name;
+ const char *dn_name = pdbg_target_dn_name(target);
+
+ safe_strcpy(comp_name, sizeof(comp_name), dn_name);
} else {
- tok = strtok(comp_name, "@");
+ safe_strcpy(comp_name, sizeof(comp_name), classname);
}
+ tok = comp_name;
if (!strcmp(tok, pats[level].prefix)) {
found = true;
--
2.20.1
More information about the Pdbg
mailing list