Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail From: brian@anorak.coverform.lan (Brian Somers) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: dummy question Date: 22 Oct 1996 11:37:37 +0100 Organization: Coverform Ltd. Lines: 34 Sender: brian@awfulhak.demon.co.uk Message-ID: <54i85h$1tb@anorak.coverform.lan> References: <53mfdu$1iv@wa4phy.async.com> <543o1d$pe0@newsbr.eunet.fr> <546jmr$1ks@anorak.coverform.lan> <5495rd$c8@uriah.heep.sax.de> Reply-To: brian@awfulhak.demon.co.uk NNTP-Posting-Host: anorak.coverform.lan X-NNTP-Posting-Host: awfulhak.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Newsreader: knews 0.9.8 In article <5495rd$c8@uriah.heep.sax.de>, j@uriah.heep.sax.de (J Wunsch) writes: : brian@anorak.coverform.lan (Brian Somers) wrote: : >> This sounds like the "ln -f" option on Sequent Dynix boxes. It allows >> you to hard-link directory entries ;) : : FreeBSD did have it until very recently, too. It was undocumented and : called -F there. It's still available in 2.1.5R, but no longer in : 2.2-current (after a fairly long debate). By the same time, the : syscall-level support for hardlinking and unlinking directories has : also been killed. (Btw., the counterpart unlink(8) was missing all : the time before. You gotta write it yourself if you have accidentally : used ln -F. It's a six-liner only, however.) The nasty bit about -f on Sequent was that after linking another name to the directory entry, you ended up with a directory node that has 3 links. I couldn't find *anything* that would remove it - except clri. unlink only does directories w/ a link count of 2 (on Sequent anyway) ! The problem is that unlink must have a special "I'm a directory" case where it's allowed to free an inode with a 2 count if it's an empty directory (only . & ..). The Sequent unlink didn't have any logic that said "if the link count > 2, decrement it and remove the entry from the parent directory file. It probably figured that a link count greater than 2 implies that there are subdirectories - therefore unlink fails :( -- Brian <brian@awfulhak.demon.co.uk> <http://www.awfulhak.demon.co.uk/> Don't _EVER_ lose your sense of humour.... .