chown has the same problem as all the others -- it has to know the
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 1 Apr 1994 08:30:38 +0000 (00:30 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 1 Apr 1994 08:30:38 +0000 (00:30 -0800)
file type so it can skip symbolic links.  Therefore, it can't set FTS_NOSTAT

SCCS-vsn: usr.sbin/chown/chown.c 8.6

usr/src/usr.sbin/chown/chown.c

index d61bff4..999e4ab 100644 (file)
@@ -12,7 +12,7 @@ static char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)chown.c    8.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)chown.c    8.6 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -96,7 +96,7 @@ main(argc, argv)
        if (argc < 2)
                usage();
 
        if (argc < 2)
                usage();
 
-       fts_options = FTS_NOSTAT | FTS_PHYSICAL;
+       fts_options = FTS_PHYSICAL;
        if (Rflag) {
                if (hflag)
                        errx(1,
        if (Rflag) {
                if (hflag)
                        errx(1,
@@ -141,6 +141,7 @@ main(argc, argv)
                        rval = 1;
                        break;
                case FTS_ERR:                   /* Warn, continue. */
                        rval = 1;
                        break;
                case FTS_ERR:                   /* Warn, continue. */
+               case FTS_NS:
                        errno = p->fts_errno;
                        warn("%s", p->fts_path);
                        rval = 1;
                        errno = p->fts_errno;
                        warn("%s", p->fts_path);
                        rval = 1;