UF_TRACKED file flag from stat.h

In the stat.h header on osx 10.7, I found a definition on fileflag UF_TRACKED. I googled what to determine, but found nothing about the flag. Can you describe me what this flag means? I came across this when I try to apply attributes to a file that fits in an installed folder. This folder is the HFS + folder on the remote osx 10.7.3. Maybe I can ignore this? And what could happen in this case?

+1
source share
1 answer

UF_TRACKED is a flag that tells HFS to send the event to the monitored file handler in user mode for any changes to the file system (for example, renaming or deleting and changing metadata, but not changing the file). You can see this as in the header file:

#define UF_TRACKED 0x00000040 /* file renames and deletes are tracked */ 

The code for processing is in the kernel, bsd / hfs / hfs_vfsutils.c:

 int check_for_tracked_file(struct vnode *vp, time_t ctime, uint64_t op_type, void *arg) { int tracked_error = 0, snapshot_error = 0; if (vp == NULL) { return 0; } if (VTOC(vp)->c_bsdflags & UF_TRACKED) { ... 

And called everywhere, mostly from hfs_vnops.c

+1
source

Source: https://habr.com/ru/post/1480252/


All Articles