Add a file flag for "hidden" files?
Eric Anderson
anderson at centtech.com
Wed Mar 22 13:57:00 UTC 2006
Mark Day wrote:
> On Mar 1, 2006, at 9:48 AM, Mark Day wrote:
>
>> I could certainly provide patches to FreeBSD for the headers, FAT,
>> NTFS, and probably HFS. The strtofflags(3) and fflagstostr(3)
>> functions should also change so you can get at the flag bit via
>> ls(1), find(1), chflags(1), etc.; I think I could provide that patch,
>> too. (I've never actually used FreeBSD, so it will take me a bit of
>> time to get it installed, find my way around the sources, make and
>> test the changes.)
>
> FYI, I submitted a patch for <sys/stat.h>, msdosfs, ntfs, and libc as
> kern/94519.
>
> Yar Tikhiy's HFS web page says that project is on hold, so I haven't
> made any patches for HFS. If there is interest in such a patch, just
> let me know.
The patch applies clean on 6.1-BETA4, and seems to work as expected.
Thanks for the patch! I got about half way through implementing the
same thing, and for some reason, I chose SF_HIDDEN instead of UF_HIDDEN,
where UF_HIDDEN makes more sense really.
I have one question (for anyone) - in what function or syscall would we
intercept directory listings (opendir?) to ignore files/directories with
this bit set? The reason I'm asking, is I'd like to mark directories
containing snapshots as hidden & snapshot, and have the system not
traverse those directories while a snapshot is being taken, to avoid
blocking on locks when a snapshot is being created.
Thanks again for the work,
Eric
--
------------------------------------------------------------------------
Eric Anderson Sr. Systems Administrator Centaur Technology
Anything that works is better than anything that doesn't.
------------------------------------------------------------------------
More information about the freebsd-fs
mailing list