set curdev, otherwise we'll statfs on every file
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 25 Jun 1990 14:06:18 +0000 (06:06 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 25 Jun 1990 14:06:18 +0000 (06:06 -0800)
SCCS-vsn: usr.bin/find/function.c 5.6

usr/src/usr.bin/find/function.c

index 0f325b1..452b321 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)function.c 5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)function.c 5.6 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -307,6 +307,7 @@ f_fstype(plan, entry)
 
        /* only check when we cross mount point */
        if (first || curdev != entry->fts_statb.st_dev) {
 
        /* only check when we cross mount point */
        if (first || curdev != entry->fts_statb.st_dev) {
+               curdev = entry->fts_statb.st_dev;
                if (statfs(entry->fts_accpath, &sb)) {
                        (void)fprintf(stderr, "find: %s: %s.\n",
                            entry->fts_accpath, strerror(errno));
                if (statfs(entry->fts_accpath, &sb)) {
                        (void)fprintf(stderr, "find: %s: %s.\n",
                            entry->fts_accpath, strerror(errno));