Date: Thu, 2 Mar 2006 09:45:32 -0800 From: Mark Day <mday@apple.com> To: Robert Watson <rwatson@FreeBSD.org> Cc: freebsd-fs@FreeBSD.org Subject: Re: Add a file flag for "hidden" files? Message-ID: <3FBE453B-D462-45D9-937F-5EDEBB67FF76@apple.com> In-Reply-To: <20060301182001.W40707@fledge.watson.org> References: <DBD69E00-A9CB-45BA-8398-2A662D18D781@apple.com> <20060301182001.W40707@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FBE453B-D462-45D9-937F-5EDEBB67FF76>