106 |
#include "ult_src.h" |
#include "ult_src.h" |
107 |
|
|
108 |
/* Find minimum value hard link filename for given file and inode */ |
/* Find minimum value hard link filename for given file and inode */ |
109 |
static __inline__ char *ult_hardlink (char *fullpath, long inode) |
static __inline__ char *ult_hardlink (char *fullpath, ino_t inode) |
110 |
{ |
{ |
111 |
DIR *mdir; |
DIR *mdir; |
112 |
struct dirent *manlist; |
struct dirent *manlist; |
146 |
} |
} |
147 |
|
|
148 |
#ifdef S_ISLNK |
#ifdef S_ISLNK |
149 |
/* use realpath() to resolve all sym links within 'fullpath'. 'mantree' is |
/* Use realpath() to resolve all sym links within 'fullpath'. */ |
150 |
the man hierarchy */ |
static __inline__ char *ult_softlink (char *fullpath) |
|
static __inline__ char *ult_softlink (char *fullpath, const char *mantree) |
|
151 |
{ |
{ |
152 |
char resolved_path[PATH_MAX]; |
char resolved_path[PATH_MAX]; |
153 |
|
|
250 |
if (flags & SOFT_LINK) { |
if (flags & SOFT_LINK) { |
251 |
if (S_ISLNK (buf->st_mode)) |
if (S_ISLNK (buf->st_mode)) |
252 |
/* Is a symlink, resolve it. */ |
/* Is a symlink, resolve it. */ |
253 |
/* (void) ult_softlink (basename, path); */ |
if (!ult_softlink (basename)) |
|
if (!ult_softlink (basename, path)) |
|
254 |
return NULL; |
return NULL; |
255 |
} |
} |
256 |
#endif /* S_ISLNK */ |
#endif /* S_ISLNK */ |