summaryrefslogtreecommitdiffstats
path: root/bin/cp
Commit message (Collapse)AuthorAgeFilesLines
* Don't attempt to change owner/mode/flags that don't need to changed.peter1998-06-101-15/+29
| | | | | | This should calm down attempts to `cp -p' to a nfs mount or some other filesystem that doesn't accept flags or all combinations of flags. It will warn if it fails to change flags though.
* Print correct error message if we copy an unreadable directory.dt1998-06-091-1/+2
|
* Make sure we pass the length - 1 to readlink, since it adds its ownimp1998-06-091-2/+2
| | | | | NUL at the end of the path. Inspired by: OpenBSD's changes in this area by theo de raadt
* Restore Lite-2 sccsid.charnier1998-05-132-4/+4
|
* Correct use of .Nm and other cosmetics. Add rcsid. Remove unused #inc.charnier1998-05-063-24/+21
|
* Fixed syntax error in normally-unconfigured code in previous commit.bde1998-01-171-2/+2
|
* Fixed handling of short writes. Previously, we stopped copying andbde1998-01-161-5/+17
| | | | | | printed a bogus warning with a stale errno if write() returns a short count. Now we continue copying. We still print a bogus warning if write() returns an "impossible" short count of 0.
* cp(1) is too silent if used with the option -i. It shouldwosch1997-10-031-2/+5
| | | | | print which input cp(1) expect (y/n) and print a warning if the file was not overwritten.
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-281-2/+2
| | | | posix standard on the topic.
* Revert $FreeBSD$ to $Id$peter1997-02-225-5/+5
|
* Sweep through the tree fixing mmap() usage:alex1997-01-161-1/+1
| | | | | | | | | | | | - Use MAP_FAILED instead of the constant -1 to indicate failure (required by POSIX). - Removed flag arguments of '0' (required by POSIX). - Fixed code which expected an error return of 0. - Fixed code which thought any address with the high bit set was an error. - Check for failure where no checks were present. Discussed with: bde
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-145-5/+5
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Merge Lite2 mods and -Wall cleaning.steve1996-12-143-9/+16
|
* [HISTORY] command appeared in Version 1 AT&T UNIXwosch1996-08-291-1/+6
| | | | Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
* Option -f implemented (remove + create)wosch1996-03-084-17/+37
| | | | | | | | | option -f and -i are exclusive respond `Y' is equal to `y' fix usage string remove isatty(3) check Reviewed by: pst
* Don't initialize udata, remove bogus case, fix usage stringpst1996-02-192-6/+5
|
* delete my last commitwosch1996-02-194-35/+14
| | | | Submitted by: pst, ache
* Option -f implemented (remove + create)wosch1996-02-184-18/+39
| | | | | | | option -f and -i are exclusive all flag variables initialized with zero respond `Y' is equal to `y' update usage string
* Preserve sticky bit for `cp -pR'. It was already preserved for `cp -R'.bde1995-10-031-2/+3
| | | | This also fixes loss of the sticky bit for `mv' across file systems.
* Don't unlink the target file if the copy failed. This behaviour isn'tbde1995-06-141-8/+7
| | | | | | | | | | documented and is incompatible with gnu cp. It has very few good effects (it recovers some disk space) and many bad ones: - special files are unlinked after certain errors. - the data may not be recoverable if the source is a special file or fifo. - unlinking destroys the target attributes as well as the target data. - unlinking doesn't actually remove the target data if the target is multiply linked.
* Remove trailing whitespace.rgrimes1995-05-302-19/+19
| | | | Reviewed by: phk
* Add braces to fix wrong if-if-else-if nesting that broke `cp -pR' forbde1995-04-021-4/+6
| | | | fifos.
* Fix bogus format string; fixes problem reported by Wolfram Schneider.dg1995-01-251-2/+2
|
* Don't strip off the last slash in the pathname "/". cp used tobde1994-12-301-18/+15
| | | | | | | | | | | | | | stat the pathname "" in order to decide that the pathname "/" is a directory. This caused `cp kernel /' to fail if the kernel has the POSIX behaviour of not allowing the pathname "" to be an alias for ".". It presumably also caused `cp /etc/motd /' to fail in the unlikely event that "." is not stat'able. Be more careful about concatenating pathnames: don't check that the pathname fits until prefixes have been discarded (the check was too strict). Print the final pathname in error messages. Terminate the target directory name properly for error messages. Don't add a slash between components if there is already a slash.
* Added $Id$dg1994-09-245-0/+7
|
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-265-0/+998
OpenPOWER on IntegriCloud