Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83eae366 authored by Florian Mayer's avatar Florian Mayer Committed by Gerrit Code Review
Browse files

Merge "Allow to target atrace apps by glob."

parents 0130a782 f1247072
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@

#include <errno.h>
#include <fcntl.h>
#include <fnmatch.h>
#include <limits.h>
#include <pthread.h>
#include <stdatomic.h>
@@ -116,7 +117,7 @@ static bool atrace_is_cmdline_match(const char* cmdline)
    for (int i = 0; i < count; i++) {
        snprintf(buf, sizeof(buf), "debug.atrace.app_%d", i);
        property_get(buf, value, "");
        if (strcmp(value, "*") == 0 || strcmp(value, cmdline) == 0) {
        if (fnmatch(value, cmdline, FNM_NOESCAPE) == 0) {
            return true;
        }
    }