Lines Matching refs:path

52 #define	ERR_PATHLONG	"path argument too long"
65 char *path;
83 static void findlink(struct cfent *ept, char *path, char *svpath);
84 static void follow(char *path);
85 static void output(char *path, int n, char *local);
92 char *pt, path[PATH_MAX];
152 /* take path list from stdin */
153 while (fgets(path, sizeof (path), stdin) != (char *)NULL) {
154 output(path, 0, NULL);
166 output(char *path, int n, char *local)
174 * remove any trailing newline characters from the end of path
177 len = strlen(path);
178 while ((len > 0) && (path[len-1] == '\n')) {
179 path[--len] = '\0';
184 entry.path = mypath;
186 (void) strlcpy(entry.path, path, PATH_MAX);
195 if (cverify(0, &entry.ftype, path, &entry.cinfo, 1)) {
197 logerr(gettext("ERROR: %s"), path);
210 if ((s = averify(0, &entry.ftype, path, &entry.ainfo)) == VE_EXIST &&
214 if ((s = readlink(path, mylocal, PATH_MAX)) > 0) {
217 if (averify(0, &entry.ftype, path, &entry.ainfo)) {
222 mylocal, path);
230 logerr(gettext("ERROR: %s"), path);
239 (void) strlcpy(entry.ainfo.local, entry.path,
245 (void) strlcpy(entry.path, local, PATH_MAX);
246 (void) strcat(entry.path, path+n);
248 (void) strlcpy(entry.path,
249 (path[n] == '/') ? path+n+1 : path+n,
253 canonize(entry.path);
254 if (entry.path[0]) {
255 findlink(&entry, path, entry.path);
267 follow(char *path)
279 if (pt = strchr(path, '=')) {
281 n = ((unsigned int)pt - (unsigned int)path - 1);
292 n = strlen(path);
303 if (stat(path, &stbuf)) {
304 progerr(gettext(ERR_STAT), path);
310 (void) snprintf(cmd, sizeof (cmd), "find %s -print", path);
322 output(path, n, local);
327 * targ_name = hlink/path/file1
329 * link_name = hlink/path/file2
332 * and if it's clearly a misplaced relative path, the duplicate
334 * in the source directory (hlink/path) when it creates the link.
365 * At this point targ_name is a relative path through at
402 * need to construct a relative path from the lowest
416 * the path and dptr is pointing to the lowest
444 findlink(struct cfent *ept, char *path, char *svpath)
451 if (lstat(path, &statbuf)) {
452 progerr(gettext(ERR_STAT), path);
459 n = readlink(path, buf, PATH_MAX);
461 progerr(gettext(ERR_RDLINK), path);
473 if (stat(path, &statbuf))
484 scan_raw_ln(link->path, ept->path),
500 new->path = strdup(svpath);
509 gettext("usage: %s [-i] [-c class] [path ...]\n"), get_prog_name());