From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24392 invoked by alias); 20 May 2009 13:52:14 -0000 Received: (qmail 24383 invoked by uid 22791); 20 May 2009 13:52:13 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from hermes.mlbassoc.com (HELO mail.chez-thomas.org) (76.76.67.137) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 May 2009 13:52:07 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 999) id 1536A3B52D3A; Wed, 20 May 2009 07:52:05 -0600 (MDT) Received: from hermes.chez-thomas.org (hermes_local [192.168.1.101]) by mail.chez-thomas.org (Postfix) with ESMTP id 9CC4E3B5261B; Wed, 20 May 2009 07:52:04 -0600 (MDT) Message-ID: <4A140B04.9050702@mlbassoc.com> Date: Wed, 20 May 2009 13:52:00 -0000 From: Gary Thomas User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Bart Veer CC: Ross Younger , ecos-devel@ecos.sourceware.org Subject: Re: Should hard links to directories work? References: <4A13F762.4050006@ecoscentric.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2009-05/txt/msg00047.txt.bz2 Bart Veer wrote: >>>>>> "Ross" == Ross Younger writes: > > Ross> The Unix world traditionally shuns such things as an > Ross> abomination. The eCos docs are quiet on the subject, as is > Ross> the code in ramfs and jffs2. Should they work? Does anybody > Ross> use them? > > Ross> (By the way: I started this discussion with a bugzilla > Ross> ticket, which as Andrew points out is probably the wrong > Ross> place. > Ross> http://bugzilla.ecoscentric.com/show_bug.cgi?id=1000775 ) > >>From http://www.opengroup.org/onlinepubs/7990989775/xsh/link.html: > > "The link() function creates a new link (directory entry) for the > existing file, path1. > > The path1 argument points to a pathname naming an existing file. The > path2 argument points to a pathname naming the new directory entry > to be created. The link() function will atomically create a new link > for the existing file and the link count of the file is incremented > by one. > > If path1 names a directory, link() will fail unless the process has > appropriate privileges and the implementation supports using link() > on directories." > > So creating links to directories is not completely disallowed, but > from my reading it is certainly discouraged. I would be happy with > changes to ramfs and jffs2 to prevent new links to directories. > jffs2 should probably continue to support such links in an existing > filesystem, in case they are created in another OS. What about "./." and "./.."? Those must certainly be allowed. -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------