From owner-freebsd-fs@FreeBSD.ORG Wed Mar 1 18:20:54 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F56516A420 for ; Wed, 1 Mar 2006 18:20:54 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0D5F43D48 for ; Wed, 1 Mar 2006 18:20:53 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k21IKnCJ035933; Wed, 1 Mar 2006 12:20:49 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <4405E601.7010304@centtech.com> Date: Wed, 01 Mar 2006 12:20:49 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5 (X11/20060112) MIME-Version: 1.0 To: Mark Day References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1308/Wed Mar 1 04:13:39 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org Subject: Re: Add a file flag for "hidden" files? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2006 18:20:54 -0000 Mark Day wrote: > Hello, > > For an future version of Mac OS X, I'm trying to solve a problem where > certain files and directories on Windows file systems don't normally > appear in the Windows GUI, but currently do appear in the Mac OS X GUI > (but they shouldn't). I'd like to gauge interest in having the change > ported back to FreeBSD (since many of our file systems are derived > from FreeBSD). The approach I'm planning to use is to add a new flag > to the file flags (i.e. the st_flags field from stat(2); settable via > chflags(2)). I'd like to avoid a collision with any flags FreeBSD > would add in the future, so either have FreeBSD adopt the flag, or > start allocating Mac OS X-specific flags from the high order bits > (since FreeBSD has been allocating them from the low order bits). My > current name for this new file flag is UF_HIDDEN. [..snip..] > 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.) > Wow - about a week ago, I started looking into this same feature for FreeBSD, because I'd like to hide directories and files for UFS2 snapshots. I came to nearly the same conclusion, using chflags, etc, and even the name for the flag. :) Anyhow, this is obviously a feature that would be useful to many people, however don't be discouraged if you get little response about it. It's a 'if you built, they will come' kind of feature anyhow. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------