perf buildid-cache: Fix symbolic link handling
authorFranck Bui-Huu <fbuihuu@gmail.com>
Fri, 10 Dec 2010 21:06:26 +0000 (22:06 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 16 Dec 2010 11:41:45 +0000 (09:41 -0200)
commit68a7a771ad0e2959983729bf88cbc74a7014438f
tree6d63982c1bd04aa461b4fdb59996cf6faad6fba4
parentc3a34e06db25a8c74e196517732d65cdb56028ec
perf buildid-cache: Fix symbolic link handling

This was broken since link(2) doesn't dereference symbolic
links. Instead 'filename' becomes a symbolic link to the same file
that 'name' refers to.

This had the bad effect to create dangling symlinks in the case that
even can't be removed with perf-buildid-cache(1).

LKML-Reference: <m38vzxxrql.fsf@gmail.com>
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c