Add a file flag for "hidden" files?
Mark Day
mday at apple.com
Thu Mar 2 09:45:47 PST 2006
On Mar 1, 2006, at 10:22 AM, Robert Watson wrote:
> You can find current flag allocation here:
>
> http://fxr.watson.org/fxr/source/sys/stat.h
The obvious (to me) choice for UF_HIDDEN would be 0x00000040 (leaving
0x00000020 unused as the user flag corresponding to SF_SNAPSHOT).
But would anyone object to using 0x00008000 (the most significant bit
of the user flags)?
The reason I ask is because HFS Plus only stores 16 bits of file
flags on disk (lower 8 bits of user flags plus lower 8 bits of super-
user flags). We're getting close to running out of the lower 8 bits,
and HFS Plus has a different place it can store UF_HIDDEN (the
"invisible" bit of the Finder Info). There's a side bonus, too,
because the UF_HIDDEN and "invisible" bits can't get out of sync if
the UF_HIDDEN flag isn't actually being stored on disk. In the Mac
OS X sources, I already have code in HFS to propagate the "invisible"
bit to UF_HIDDEN and vice versa to make sure they always appear
consistent (if either one is set, then both are set).
Or would you prefer I use 0x00000020 since there is no user flag
equivalent of SF_SNAPSHOT?
-Mark
More information about the freebsd-fs
mailing list