summaryrefslogtreecommitdiff
path: root/tools/lib/api/fd
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/api/fd')
-rw-r--r--tools/lib/api/fd/array.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/lib/api/fd/array.c b/tools/lib/api/fd/array.c
index 67b73481df27..3200746d1657 100644
--- a/tools/lib/api/fd/array.c
+++ b/tools/lib/api/fd/array.c
@@ -116,6 +116,10 @@ int fdarray__filter(struct fdarray *fda, short revents,
return 0;
for (fd = 0; fd < fda->nr; ++fd) {
+ /*
+ * Explicitly bypass nonfilterable items (e.g. control descriptors).
+ * This ensures their fd, events, and revents remain completely untouched.
+ */
if (fda->priv[fd].flags & fdarray_flag__nonfilterable)
continue;