SCCS-vsn: usr.bin/find/find.c 4.28
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)find.c 4.27 (Berkeley) %G%";
+static char sccsid[] = "@(#)find.c 4.28 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
exit(1);
}
while (entry = ftsread(tree)) {
exit(1);
}
while (entry = ftsread(tree)) {
+ switch(entry->fts_info) {
case FTS_DNR:
(void)fprintf(stderr,
case FTS_DNR:
(void)fprintf(stderr,
- "find: %s: unable to read.\n", entry->path);
+ "find: %s: unable to read.\n", entry->fts_path);
continue;
case FTS_DNX:
(void)fprintf(stderr,
continue;
case FTS_DNX:
(void)fprintf(stderr,
- "find: %s: unable to search.\n", entry->path);
+ "find: %s: unable to search.\n", entry->fts_path);
continue;
case FTS_ERR:
(void)fprintf(stderr,
continue;
case FTS_ERR:
(void)fprintf(stderr,
- "find: %s: %s.\n", entry->path, strerror(errno));
+ "find: %s: %s.\n", entry->fts_path,
+ strerror(errno));
continue;
case FTS_D:
if (depth)
continue;
case FTS_D:
if (depth)
break;
case FTS_DC:
(void)fprintf(stderr,
break;
case FTS_DC:
(void)fprintf(stderr,
- "find: directory cycle: %s.\n", entry->path);
+ "find: directory cycle: %s.\n", entry->fts_path);
continue;
case FTS_DP:
if (!depth)
continue;
case FTS_DP:
if (!depth)
case FTS_NS:
if (!(ftsoptions & FTS_NOSTAT)) {
(void)fprintf(stderr,
case FTS_NS:
if (!(ftsoptions & FTS_NOSTAT)) {
(void)fprintf(stderr,
- "find: can't stat: %s.\n", entry->path);
+ "find: can't stat: %s.\n", entry->fts_path);
continue;
}
break;
}
/* always keep curdev up to date, -fstype uses it. */
continue;
}
break;
}
/* always keep curdev up to date, -fstype uses it. */
- if (xdev && curdev != entry->statb.st_dev &&
+ if (xdev && curdev != entry->fts_statb.st_dev &&
curdev != -1 && ftsset(tree, entry, FTS_SKIP)) {
(void)fprintf(stderr, "find: %s: %s.\n",
curdev != -1 && ftsset(tree, entry, FTS_SKIP)) {
(void)fprintf(stderr, "find: %s: %s.\n",
- entry->path, strerror(errno));
+ entry->fts_path, strerror(errno));
*/
for (p = plan; p && (p->eval)(p, entry); p = p->next);
*/
for (p = plan; p && (p->eval)(p, entry); p = p->next);
- curdev = entry->statb.st_dev;
+ curdev = entry->fts_statb.st_dev;
}
(void)ftsclose(tree);
}
}
(void)ftsclose(tree);
}