From aaa0f1908b890bbebcf1d680d74b263a185d225d Mon Sep 17 00:00:00 2001 From: JoeSergen Date: Sat, 25 Jul 2026 15:20:43 +0800 Subject: [PATCH] fix: fs_watch calls trace_file_init instead of mountsnoop_init with path argument When fs_watch() is called with a non-null path, the else branch incorrectly calls trace_file_init() instead of mountsnoop_init(). This is a copy-paste error from file_watch(). The correct behavior is to initialize mountsnoop for filesystem event monitoring. Signed-off-by: JoeSergen --- so/dkapture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/so/dkapture.cpp b/so/dkapture.cpp index 149c05a..5eb916a 100644 --- a/so/dkapture.cpp +++ b/so/dkapture.cpp @@ -385,7 +385,7 @@ int dkapture::fs_watch(const char *path, DKCallback cb, void *ctx) char *arg1 = (char *)"-p"; char *arg2 = (char *)path; char *args[] = {arg0, arg1, arg2, 0}; - return trace_file_init(3, args, cb, ctx); + return mountsnoop_init(3, args, cb, ctx); } }