Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: hardlink to symlink behaviour [was: Re: MKXORG=yes on Linux: nbmtree: existing entry for `', type `link' does not match type `file']

On Tue, Sep 30, 2008 at 07:20:56PM -0400, Thor Lancelot Simon wrote:
> On Tue, Sep 30, 2008 at 02:59:32PM +0200, Joerg Sonnenberger wrote:
> > On Tue, Sep 30, 2008 at 01:59:15PM +0200, Hubert Feyrer wrote:
> > > Digging a bit more into this, it's related to the difference in handling  
> > > hardlink to symlinks. On NetBSD, it seems that you get a link to the  
> > > target file these days[1], while on Linux you get a link to the  
> > > symlink[2]. ISTR that NetBSD used to behave like Linux there - is this  
> > > really intended?
> > 
> > NetBSD behaves like POSIX and always has.
> Does POSIX actually specify this?  The difference probably stems from
> whether or not the symlink consumes an inode: on 4.3BSD and prior, it
> always did, and on 4.4 and NetBSD it does not (or is arranged to look
> as if it does not, in a few uncommon cases, IIRC).

POSIX allows in some places this behavior. But the general rules for
system calls apply to symlink(2) as well, so POSIX doesn't really specify a
mechanism to create. The POSIX rules are intended as you said for
implementing symlinks without separate inodes.


Home | Main Index | Thread Index | Old Index