aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/api/fs/tracing_path.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2023-02-21 11:19:49 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2023-02-21 11:19:49 -0800
commit7ae9fb1b7ecbb5d85d07857943f677fd1a559b18 (patch)
treedbdd35328f43569c38c4ce193cefd7d2b6b9fbfd /tools/lib/api/fs/tracing_path.c
parentInput: i8042 - add Clevo PCX0DX to i8042 quirk table (diff)
parentdt-bindings: input: iqs626a: Redefine trackpad property types (diff)
downloadlinux-rng-7ae9fb1b7ecbb5d85d07857943f677fd1a559b18.tar.xz
linux-rng-7ae9fb1b7ecbb5d85d07857943f677fd1a559b18.zip
Merge branch 'next' into for-linus
Prepare input updates for 6.3 merge window.
Diffstat (limited to 'tools/lib/api/fs/tracing_path.c')
-rw-r--r--tools/lib/api/fs/tracing_path.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/lib/api/fs/tracing_path.c b/tools/lib/api/fs/tracing_path.c
index 5afb11b30fca..b8e457c841ab 100644
--- a/tools/lib/api/fs/tracing_path.c
+++ b/tools/lib/api/fs/tracing_path.c
@@ -113,6 +113,22 @@ DIR *tracing_events__opendir(void)
return dir;
}
+int tracing_events__scandir_alphasort(struct dirent ***namelist)
+{
+ char *path = get_tracing_file("events");
+ int ret;
+
+ if (!path) {
+ *namelist = NULL;
+ return 0;
+ }
+
+ ret = scandir(path, namelist, NULL, alphasort);
+ put_events_file(path);
+
+ return ret;
+}
+
int tracing_path__strerror_open_tp(int err, char *buf, size_t size,
const char *sys, const char *name)
{