From owner-svn-src-all@FreeBSD.ORG Fri Jun 27 19:57:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEF67529; Fri, 27 Jun 2014 19:57:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9C5B267F; Fri, 27 Jun 2014 19:57:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5RJvsG4074327; Fri, 27 Jun 2014 19:57:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5RJvs6j074326; Fri, 27 Jun 2014 19:57:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201406271957.s5RJvs6j074326@svn.freebsd.org> From: Xin LI Date: Fri, 27 Jun 2014 19:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267977 - head/bin/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2014 19:57:55 -0000 Author: delphij Date: Fri Jun 27 19:57:54 2014 New Revision: 267977 URL: http://svnweb.freebsd.org/changeset/base/267977 Log: Always set UF_ARCHIVE on target (because they are by definition new files and should be archived) and ignore error when we can't set it (e.g. NFS). Reviewed by: ken MFC after: 2 weeks Modified: head/bin/mv/mv.c Modified: head/bin/mv/mv.c ============================================================================== --- head/bin/mv/mv.c Fri Jun 27 19:50:30 2014 (r267976) +++ head/bin/mv/mv.c Fri Jun 27 19:57:54 2014 (r267977) @@ -337,8 +337,8 @@ err: if (unlink(to)) * on a file that we copied, i.e., that we didn't create.) */ errno = 0; - if (fchflags(to_fd, sbp->st_flags)) - if (errno != EOPNOTSUPP || sbp->st_flags != 0) + if (fchflags(to_fd, sbp->st_flags | UF_ARCHIVE)) + if (errno != EOPNOTSUPP || ((sbp->st_flags & ~UF_ARCHIVE) != 0)) warn("%s: set flags (was: 0%07o)", to, sbp->st_flags); tval[0].tv_sec = sbp->st_atime;