Subject: Re: chmod & symlink broken in 1.6
To: Andrew Brown <atatat@atatdot.net>
From: Greywolf <greywolf@starwolf.com>
List: tech-kern
Date: 10/29/2002 17:37:47
On Tue, 29 Oct 2002, Andrew Brown wrote:

# and i think they do.  link(2) is the only questionable one.  do you
# really want a hardlink to a symbolic link, or do you want a hard link
# to the actual file?

Not questionable at all.  A symbolic link takes an inode, while a hard
link does not.  Since link(2) explicitly creates hard links which are _by
definition_ entries on the same device referring to the same inode, and
thus indistinguishable from each other, if you hardlink to a symlink,
you will have two symlinks in different places.

"Whether both will work identically is left as an exercise for the reader."

If you want a hard link to an actual file, readlink()/link() becomes
the way to go.

				--*greywolf;
--
NetBSD: more is more.