public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: Bart Veer <bartv@ecoscentric.com>
To: Ross Younger <wry@ecoscentric.com>
Cc: ecos-devel@ecos.sourceware.org
Subject: Re: Should hard links to directories work?
Date: Wed, 20 May 2009 13:45:00 -0000	[thread overview]
Message-ID: <pnbppnanx2.fsf@delenn.bartv.net> (raw)
In-Reply-To: <4A13F762.4050006@ecoscentric.com> (message from Ross Younger on 	Wed, 20 May 2009 13:28:18 +0100)

>>>>> "Ross" == Ross Younger <wry@ecoscentric.com> 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.

Bart

-- 
Bart Veer                                   eCos Configuration Architect
eCosCentric Limited    The eCos experts      http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.

  reply	other threads:[~2009-05-20 13:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-20 12:28 Ross Younger
2009-05-20 13:45 ` Bart Veer [this message]
2009-05-20 13:52   ` Gary Thomas
2009-05-20 14:42     ` Ross Younger
2009-05-20 16:56   ` Jonathan Larmour
2009-05-20 14:21 sandeep
2009-05-20 14:47 ` Ross Younger
2009-05-20 16:00 ` Rutger Hofman
2009-05-20 16:35   ` Nick Garnett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pnbppnanx2.fsf@delenn.bartv.net \
    --to=bartv@ecoscentric.com \
    --cc=ecos-devel@ecos.sourceware.org \
    --cc=wry@ecoscentric.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).