diff options
Diffstat (limited to 'bin/mv')
-rw-r--r-- | bin/mv/Makefile | 2 | ||||
-rw-r--r-- | bin/mv/Makefile.depend | 2 | ||||
-rw-r--r-- | bin/mv/mv.1 | 3 | ||||
-rw-r--r-- | bin/mv/mv.c | 27 | ||||
-rw-r--r-- | bin/mv/tests/Makefile | 1 | ||||
-rw-r--r-- | bin/mv/tests/Makefile.depend | 1 | ||||
-rw-r--r-- | bin/mv/tests/legacy_test.sh | 1 |
7 files changed, 7 insertions, 30 deletions
diff --git a/bin/mv/Makefile b/bin/mv/Makefile index e16243f06c3b..2413f572874f 100644 --- a/bin/mv/Makefile +++ b/bin/mv/Makefile @@ -1,5 +1,3 @@ -# @(#)Makefile 8.2 (Berkeley) 4/2/94 -# $FreeBSD$ .include <src.opts.mk> diff --git a/bin/mv/Makefile.depend b/bin/mv/Makefile.depend index 6cfaab1c3644..6ef78fac5cbf 100644 --- a/bin/mv/Makefile.depend +++ b/bin/mv/Makefile.depend @@ -1,8 +1,6 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ diff --git a/bin/mv/mv.1 b/bin/mv/mv.1 index 24cc61ba2b52..138ce99f586f 100644 --- a/bin/mv/mv.1 +++ b/bin/mv/mv.1 @@ -29,9 +29,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)mv.1 8.1 (Berkeley) 5/31/93 -.\" $FreeBSD$ -.\" .Dd March 15, 2013 .Dt MV 1 .Os diff --git a/bin/mv/mv.c b/bin/mv/mv.c index 01d88ff625b7..8aea4bbf567c 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -32,20 +32,6 @@ * SUCH DAMAGE. */ -#if 0 -#ifndef lint -static char const copyright[] = -"@(#) Copyright (c) 1989, 1993, 1994\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint -static char sccsid[] = "@(#)mv.c 8.2 (Berkeley) 4/2/94"; -#endif /* not lint */ -#endif -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <sys/acl.h> #include <sys/param.h> @@ -186,7 +172,7 @@ do_move(const char *from, const char *to) */ if (!fflg && !access(to, F_OK)) { - /* prompt only if source exist */ + /* prompt only if source exists */ if (lstat(from, &sb) == -1) { warn("%s", from); return (1); @@ -333,6 +319,12 @@ err: if (unlink(to)) */ preserve_fd_acls(from_fd, to_fd, from, to); (void)close(from_fd); + + ts[0] = sbp->st_atim; + ts[1] = sbp->st_mtim; + if (futimens(to_fd, ts)) + warn("%s: set times", to); + /* * XXX * NFS doesn't support chflags; ignore errors unless there's reason @@ -353,11 +345,6 @@ err: if (unlink(to)) } else warn("%s: cannot stat", to); - ts[0] = sbp->st_atim; - ts[1] = sbp->st_mtim; - if (futimens(to_fd, ts)) - warn("%s: set times", to); - if (close(to_fd)) { warn("%s", to); return (1); diff --git a/bin/mv/tests/Makefile b/bin/mv/tests/Makefile index 229d96e5766a..1785fa6c5149 100644 --- a/bin/mv/tests/Makefile +++ b/bin/mv/tests/Makefile @@ -1,4 +1,3 @@ -# $FreeBSD$ .include <bsd.own.mk> diff --git a/bin/mv/tests/Makefile.depend b/bin/mv/tests/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/bin/mv/tests/Makefile.depend +++ b/bin/mv/tests/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/bin/mv/tests/legacy_test.sh b/bin/mv/tests/legacy_test.sh index d0a5e83440c6..8af025a0d011 100644 --- a/bin/mv/tests/legacy_test.sh +++ b/bin/mv/tests/legacy_test.sh @@ -1,5 +1,4 @@ #!/bin/sh -# $FreeBSD$ # A directory in a device different from that where the tests are run TMPDIR=/tmp/regress.$$ |