Re: [PATCH v2 00/27] Builtin FSMonitor Part 3
- From
- Jeff Hostetler <git@jeffhostetler.com>
- Date
- Mar 21, 2022, 22:06 UTC
- Message-ID
- <2bb125d3-cef7-9d47-efa8-61a1aaba5316@jeffhostetler.com>
- In-Reply-To
- <20220313104230.ctwbskywcq5jxv36@tb-raspi4>
On 3/13/22 6:42 AM, Torsten Bögershausen wrote:
Show 27 quoted lines
> Hej Jeff, > > I tried your patch on both a newer Mac and an older machine (with HFS+) > The older machine doesn't have > kFSEventStreamEventFlagItemCloned > As it is an enum, and not a #define, I ended up here: > > diff --git a/compat/fsmonitor/fsm-listen-darwin.c b/compat/fsmonitor/fsm-listen-darwin.c > index 3332d3b779..fa172a05c4 100644 > --- a/compat/fsmonitor/fsm-listen-darwin.c > +++ b/compat/fsmonitor/fsm-listen-darwin.c > @@ -169,8 +169,6 @@ static void log_flags_set(const char *path, const FSEventStreamEventFlags flag) > strbuf_addstr(&msg, "ItemXattrMod|"); > if (flag & kFSEventStreamEventFlagOwnEvent) > strbuf_addstr(&msg, "OwnEvent|"); > - if (flag & kFSEventStreamEventFlagItemCloned) > - strbuf_addstr(&msg, "ItemCloned|"); > > trace_printf_key(&trace_fsmonitor, "fsevent: '%s', flags=0x%x %s", > path, flag, msg.buf); > @@ -221,8 +219,7 @@ static int ef_ignore_xattr(const FSEventStreamEventFlags ef) > kFSEventStreamEventFlagItemModified | > kFSEventStreamEventFlagItemRemoved | > kFSEventStreamEventFlagItemRenamed | > - kFSEventStreamEventFlagItemXattrMod | > - kFSEventStreamEventFlagItemCloned; > + kFSEventStreamEventFlagItemXattrMod ;
It looks like the ...Cloned bit was added to the SDK in 10.13 [1]. All the other bits were defined sometime between 10.5 and 10.10.
I'll add something in V7 to guard that bit. I think 10.10 is old enough that we don't need to special case those bits too.
Thanks, Jeff
[1] /Applications/Xcode.app/Contents/Developer/Platforms/ \
MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/ \
Library/Frameworks/CoreServices.framework/Frameworks/ \
FSEvents.framework/Versions/Current/Headers/FSEvents.h