From 33370a8c97086d7494c9bf0dd0ccd15cdcf497cb Mon Sep 17 00:00:00 2001 From: Axel Svensson Date: Thu, 4 Sep 2025 15:33:56 +0200 Subject: [PATCH 1/3] Let --filter distinguish between < and > --- fatrace.8 | 5 ++--- fatrace.c | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fatrace.8 b/fatrace.8 index 782669b..7117ee2 100644 --- a/fatrace.8 +++ b/fatrace.8 @@ -191,9 +191,8 @@ Ignore events for this process ID. Can be specified multiple times. .TP .B \-f \fITYPES\fR, \fB\-\-filter=\fITYPES Show only the given event types. \fBTYPES\fR is a list of -.BR C ", " R ", " O ", " W ", " D ", " + ", or " < -with the above meanings. \fB<\fR and \fB>\fR both mean "move" and will always -enable both directions. +.BR C ", " R ", " O ", " W ", " D ", " + ", " < ", or " > +with the above meanings. E. g. use \fB\-\-filter=OC\fR to only show open and close events. diff --git a/fatrace.c b/fatrace.c index bd0102f..e683535 100644 --- a/fatrace.c +++ b/fatrace.c @@ -749,8 +749,10 @@ parse_args (int argc, char** argv) option_filter_mask |= FAN_DELETE; break; case '<': + option_filter_mask |= FAN_MOVED_FROM; + break; case '>': - option_filter_mask |= FAN_MOVE; + option_filter_mask |= FAN_MOVED_TO; break; #endif default: -- 2.46.3