summaryrefslogtreecommitdiffstats
path: root/bin/mv
Commit message (Collapse)AuthorAgeFilesLines
* Close from_fd if malloc() fails to avoid a file descriptor leak.truckman2016-05-251-0/+1
| | | | | | Reported by: Coverity CID: 1007203 MFC after: 1 week
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedngie2016-05-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division
* MFHgjb2016-03-101-0/+11
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * DIRDEPS_BUILD: Connect MK_TESTS.bdrewery2016-03-091-0/+11
| | | | | | | | Sponsored by: EMC / Isilon Storage Division
* | Explicitly add unmarked bin/ binaries to the runtime package.gjb2016-02-091-0/+1
| | | | | | | | | | | | | | | | Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate package, which requires pre-install/post-install scripts, to be added later. Sponsored by: The FreeBSD Foundation
* | First pass to fix the 'tests' packages.gjb2016-02-021-0/+4
|/ | | | Sponsored by: The FreeBSD Foundation
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andngie2015-10-121-2/+0
| | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison
* mv: Improve message when moving two or more files to non-directory.jilles2015-06-281-1/+1
| | | | | | | | | | The message text is from cp, which has had a nicer message for this since 2007 (PR bin/50656). As with cp, the exit status changes from 64 to 1. PR: 201083 MFC after: 1 week
* Add META_MODE support.sjg2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-271-5/+4
| |\ | |/ |/|
| * Merge head from 7/28sjg2014-08-191-4/+13
| |\
| * | Updated dependenciessjg2014-05-161-1/+0
| | |
| * | Updated dependenciessjg2014-05-101-0/+2
| | |
| * | Merge from headsjg2014-05-081-1/+1
| |\ \
| * \ \ Merge headsjg2014-04-283-0/+311
| |\ \ \
| * \ \ \ sync from headsjg2013-04-122-2/+12
| |\ \ \ \
| * | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | |
| * | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | |
| * | | | | Sync with HEAD.obrien2013-02-081-1/+1
| |\ \ \ \ \
| | \ \ \ \ \
| | \ \ \ \ \
| *-. \ \ \ \ \ Sync from headsjg2012-11-042-6/+36
| |\ \ \ \ \ \ \
| * | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+19
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | cp,mv: Use futimens() instead of utimensat() if possible.jilles2015-03-231-1/+1
| | | | | | | |
* | | | | | | | cp,mv,touch: Set timestamps with nanosecond precision.jilles2015-01-241-5/+4
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | This uses utimensat().
* | | | | | | Check if fchflags() is needed by fstat'ing before and checkdelphij2014-07-011-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the results. Reviewed by: jilles X-MFC-With: r267977
* | | | | | | Always set UF_ARCHIVE on target (because they are by definition new filesdelphij2014-06-271-2/+2
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and should be archived) and ignore error when we can't set it (e.g. NFS). Reviewed by: ken MFC after: 2 weeks
* | | | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffimp2014-05-061-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | from the latter.
* | | | | Make bsd.test.mk the only public mk fragment for the building of tests.jmmv2014-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change {atf,plain,tap}.test.mk to be internal implementation details of bsd.test.mk. Makefiles that build tests should now only include bsd.test.mk and declaratively specify what they want to build, without worrying about the internal implementation of the mk files. The reason for this change is to permit building test programs of different interfaces from a single directory, which is something I had a need for while porting tests over from src/tools/regression/. Additionally, this change makes it possible to perform some other requested changes to bsd.test.mk in an easier manner. Coming soon.
* | | | | Migrate tools/regression/bin/ tests to the new layout.jmmv2013-12-113-0/+311
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is a proof of concept on how to easily integrate existing tests from the tools/regression/ hierarchy into the /usr/tests/ test suite and on how to adapt them to the new layout for src. To achieve these goals, this change: - Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/. - Renames the previous regress.sh files to legacy_test.sh. - Adds Makefiles to build and install the tests and all their supporting data files into /usr/tests/bin/. - Plugs the legacy_test test programs into the test suite using the new TAP backend for Kyua (appearing in 0.8) so that the code of the test programs does not have to change. - Registers the new directories in the BSD.test.dist mtree file. Reviewed by: freebsd-testing Approved by: rpaulo (mentor)
* | | | - Make 'flags' argument to chflags(2), fchflags(2) and lchflags(2) of typepjd2013-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | u_long. Before this change it was of type int for syscalls, but prototypes in sys/stat.h and documentation for chflags(2) and fchflags(2) (but not for lchflags(2)) stated that it was u_long. Now some related functions use u_long type for flags (strtofflags(3), fflagstostr(3)). - Make path argument of type 'const char *' for consistency. Discussed on: arch Sponsored by: The FreeBSD Foundation
* | | | Add a few examples.joel2013-03-151-1/+11
| |_|/ |/| | | | | | | | Obtained from: OpenBSD
* | | Follow the behavior as specified in POSIX:eadler2012-11-151-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | if (exists AND (NOT f_option) AND ((not_writable AND input_is_terminal) OR i_option)) prompt in particular, add the test for input_is_terminal PR: bin/173039 Submitted by: Mark Johnston <markjdb@gmail.com> Approved by: cperciva MFC after: 3 days
* | Add a -h flag similar to the -h flag for ln to force mv(1) to treat ajhb2012-08-312-6/+36
|/ | | | | | | | | symbolic link to a directory for the target as a symbolic link instead of a directory. This makes it possible to atomically update a symbolic link using rename(). Reviewed by: gj MFC after: 2 weeks
* Put some static keywords in the source code.ed2011-10-311-1/+1
| | | | | | For these simple utilities, it doesn't harm to make all global variables static. In fact, this allows the compiler to perform better forms of optimisation and analysis.
* Don't chop IO into small pieces, follow cp(1) and just use MAXPHYS.ivoras2011-10-031-15/+9
|
* Add NFSv4 ACL support to mv(1).trasz2009-09-041-12/+58
| | | | Reviewed by: rwatson
* Staticify symbols that will not be used in otherdelphij2008-07-191-11/+11
| | | | places.
* - Roll-back attempts to mimic rename(2) atomicity introduced in 1.47,dds2007-12-271-95/+69
| | | | | | | | | | | | | | and follow the letter of the POSIX specification. - Moving a directory to an existing non-empty directory will now fail, as required. - Improve consistency and remove some style bugs of earlier versions. This version passes all tests of tools/regression/bin/mv/regress.sh 1.6 Reviewed by: bde MFC after: 1 month
* Calling any function from vfork other than exec* and _exit yieldsdds2007-12-171-3/+9
| | | | | | undefined behavior. Noted by: alfred
* Eliminate gcc "variable clobbered" warnings by declaring the variablesdds2007-12-161-1/+2
| | | | | | living across the vfork as volatile. Noted by: kan
* When moving a directory across devices to a place where a directorydds2007-12-161-22/+82
| | | | | | | | | | | | | | | | | with the same name exists, delete that directory first, before performing the copy. This ensures that mv(1) across devices follows the semantics of rename(2), as required by POSIX. This change could introduce the potential of data loss, even if the copy fails, violating the atomicity properties of rename(2). This is (mostly) mitigated by first renaming the destination and obliterating it only after a succesfull copy. The above logic also led to the introduction of code that will cleanup the results of a partial copy, if a cross-device copy fails. PR: bin/118367 MFC after: 1 month
* Bump document date on behalf of previous revision.ru2007-11-011-1/+1
|
* Replace a fairly opaque sentence with a much clearer wording from NetBSD.pav2007-05-121-2/+2
| | | | | | PR: docs/101330 (inspired by) Submitted by: Peter Gildea <peter@gildea.com> Obtained from: NetBSD
* Attempt to complete the userspace integration of POSIX.1e extended ACLs.csjp2005-09-051-1/+18
| | | | | | | | | | | | | | This includes adding support for ACLs into cp(1) and mv(1) userspace utilities. For mv(1), if _PC_ACL_EXTENDED is in effect for the source AND destination operands, the destination file's ACLs shall reflect the source. For cp(1), if _PC_ACL_EXTENDED is in effect for both source and destination operands, and -p has been specified, the ACLs from the source shall be preserved on the destination. MFC after: 1 month
* Correct a few places where we called warn() when warnx() should havemux2005-05-191-4/+4
| | | | | | | been used. Submitted by: "Liam J. Foy" <liamfoy@sepulcrum.org> Obtained from: DragonFlyBSD
* Add the new standard EXIT STATUS section where appropriate.ru2005-01-161-5/+5
| | | | Sort standard sections in the (documented) preferred order.
* /*- or .\"- or #- to begin license clauses.imp2005-01-102-1/+2
|
* Remove clause 3 from the UCB licenses.markm2004-04-062-8/+0
| | | | OK'ed by: imp, core
* When symbolic link is pointed onto a mount point, it can't be movedpjd2004-03-211-6/+17
| | | | | | | | | to a different file system. Patch in PR was incorrect. PR: bin/64430 Submitted by: Samuel Tardieu MFC after: 3 days
* Centralize _PATH_* definitions.obrien2003-05-052-39/+0
| | | | Submitted by: Tim Kientzle <kientzle@acm.org> (embellished by me)
OpenPOWER on IntegriCloud