summaryrefslogtreecommitdiffstats
path: root/bin/cp
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo.ceri2006-11-021-1/+1
|
* Wording nits.trhodes2006-10-271-11/+7
|
* Flesh out the compatibility section a little bit. Bump doc date.trhodes2006-10-241-30/+20
|
* Fix style(9) bugs in previous commit.trhodes2006-10-111-7/+4
| | | | Lesson from: bde
* Make -r a synonym for -R, similar to behavior on Linux while being backwardstrhodes2006-10-072-14/+41
| | | | | | | | compatible with old -r behavior with regards to -L. You can now copy fifos and other special files with -r. Reviewed by: -standards (long ago), das, bde Approved by: bde (recently)
* o Style(9).maxim2006-10-071-9/+7
| | | | Submitted by: bde
* o Avoid division by zero.maxim2006-10-071-3/+8
| | | | | | o Place error checking code near to the syscall. Submitted by: bde
* o Hold copied bytes counter in off_t. This prevents statisticsmaxim2006-10-061-1/+1
| | | | | | | | displayed by SIGINFO handler from overflow. PR: bin/104039 Submitted by: Geoffrey Giesemann MFC after: 2 weeks
* Move the -l option processing to where it belongs.ru2006-09-291-4/+4
| | | | Overall still not kosher but better matches style(9).
* - Fix options order.ru2006-08-252-7/+7
| | | | - Touch manpage's document date.
* Remove a stray -a option that probably sneaked in from julian'sru2006-08-251-2/+2
| | | | attempt to enter append mode twice in vi(1). :-)
* Add an option to allow copying of a hierarchy while linking he regular files.julian2006-08-244-82/+105
| | | | | | Bikeshedded to death on: hackers Submitted by:andersonatcenttech.com MFC in: 1 month
* o Call fts_close() before exit.maxim2006-07-041-0/+1
| | | | Obtained from: NetBSD, Coverity ID 1754
* Attempt to complete the userspace integration of POSIX.1e extended ACLs.csjp2005-09-053-1/+86
| | | | | | | | | | | | | | 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
* Fix a few markup nits in previous commit.trhodes2005-02-251-1/+3
| | | | Noticed by: ru, who else? :)
* Note how cp(1) handles directories ending in "/."trhodes2005-02-241-1/+5
| | | | | PR: 75774 Submitted by: Mike Meyer <mwm@mired.org> (original version)
* Sync program's usage() with manpage's SYNOPSIS.ru2005-02-091-2/+3
|
* Add the new standard EXIT STATUS section where appropriate.ru2005-01-161-1/+1
| | | | Sort standard sections in the (documented) preferred order.
* /*- or .\"- or #- to begin license clauses.imp2005-01-102-1/+2
|
* Mechanically kill hard sentence breaks.ru2004-07-021-1/+2
|
* Plug file descriptor leak in implementation of -n option.tjr2004-06-051-0/+1
|
* Remove clause 3 from the UCB licenses.markm2004-04-064-16/+0
| | | | OK'ed by: imp, core
* Don't mmap(2) and munmap(2) zero-length files.alc2003-11-131-1/+2
| | | | Submitted by: Wiktor Niesiobedzki <bsd@w.evip.pl>
* pass -1 to setfile in cp.cjmg2003-06-301-1/+1
| | | | Submitted by: Jun Kuriyama
* support saving both user/group and permissions on symlinks (from PR)jmg2003-06-221-13/+20
| | | | | | | | also fix a slight bogon that assumed an fd of 0 was not valid. Changed it to be -1. PR: bin/25017 Submitted by: Martin Kammerhofer
* Clarify what -p option does.ru2003-06-071-11/+12
| | | | | | Prodded by: marcel While here, spell the "set-{user,group}-ID bit" correctly.
* Quiet warnings about copyright[].obrien2003-05-011-2/+2
|
* Include <signal.h> instead of depending on namespace pollution inbde2003-04-131-1/+2
| | | | | <sys/param.h>. Include <sys/types.h> instead of of <sys/param.h> so that further such dependencies don't develop.
* Fixed some style bugs in rev.1.44.bde2003-04-131-3/+2
|
* Use the correct data type and qualifier for signal flag.mdodd2003-04-072-2/+2
|
* Add a SIGINFO handler.mdodd2003-04-074-0/+45
|
* Constify and staticify for lint.markm2002-10-183-6/+6
|
* cp -p could report success even if a file copy failed. This was due tomckay2002-09-221-3/+4
| | | | | | | | | | | the cumulative exit status being overwritten when directory permissions were being set. This was particularly bad when called from mv(1) to perform a cross-device move as the original files were deleted even if the copy failed. Reported by: Slaven Rezic <slaven.rezic@berlin.de> Patch by: bde PR: 42789
* Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the structwollman2002-09-211-2/+2
| | | | | | | | | | | | | | | | hack, thereby allowing future extensions to the structure (e.g., for extended attributes) without rebreaking the ABI. FTSENT now contains a pointer to the parent stream, which fts_compar() can then take advantage of, avoiding the undefined behavior previously warned about. As a consequence of this change, the prototype of the comparison function passed to fts_open() has changed to reflect the required amount of constness for its use. All callers in the tree are updated to use the correct prototype. Comparison functions can now make use of the new parent pointer to access the new stream-specific private data pointer, which is intended to assist creation of reentrant library routines which use fts(3) internally. Not objected to in spirit by: -arch
* Bump document date for the -n option.johan2002-08-161-1/+1
| | | | Approved by: sheldonh (mentor)
* mdoc(7) police: grammar.ru2002-08-091-1/+1
|
* Fix some easy WARNS.markm2002-07-311-4/+4
|
* Add the -n option, which automatically answers "no" to the overwrite question.johan2002-07-234-12/+35
| | | | | | | PR: 7828 Suggested by: Daniel O'Connor <doconnor@gsoft.com.au> Approved by: sheldonh (mentor) MFC after: 2 weeks
* Revert previous delta, which is not required with rev 1.5 ofsheldonh2002-07-151-1/+0
| | | | src/contrib/gcc/c-format.c .
* Set WFORMAT=0, because our compiler currently complains about NULLsheldonh2002-07-111-0/+1
| | | | | | | | | | | | | | | | | | arg 2 to err() and friends, and warnings are promoted to errors. This allows the following revisions to be reverted: rev 1.39 src/bin/cp/cp.c rev 1.26 src/bin/chmod/chmod.c rev 1.40 src/bin/rm/rm.c The following revisions can already be reverted, because they were already covered by WFORMAT=0: rev 1.8 src/bin/ls/lomac.c rev 1.63 src/bin/ls/ls.c rev 1.8 src/bin/ps/lomac.c rev 1.34 src/bin/rcp/rcp.c
* err() is documented as allowing NULL for the format string but GCC isn'tdillon2002-07-101-1/+1
| | | | happy about it any more so change the usage to make buildworld work again.
* Fix some low-hanging lint-fruit: endianness and staticness warnings.markm2002-07-032-4/+6
|
* Consistently use __FBSDIDobrien2002-06-302-4/+4
|
* When -R is not specified, fail to copy the contents of dangling symlinkstjr2002-06-131-3/+11
| | | | | | instead of making a copy of the link itself (SUSv3) Obtained from: NetBSD
* Optimize prev. commit code a bitache2002-05-171-4/+4
|
* Trailing slash fixes.ache2002-05-171-2/+12
| | | | | | | | | | Fix the case: cp file nonexistent/ which create nonextstent as file while trailing slash clearly indicates that nonexistent must be a directory. Also fix the case: cp file1 file2/ which should produce error.
* Add semicolon to empty default case to silence warning.alfred2002-05-111-0/+1
|
* Fixed some style bugs in revs 1.1 and 1.4.bde2002-02-231-4/+4
|
* Fix warnings inspired by lint, a commercial lint and WARNS=4.markm2002-02-224-21/+20
|
* Modernization effort for bin/c*:imp2002-02-023-33/+17
| | | | | | | | | | | | o __P has been reoved o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. Approved by: arch@, new style(9)
OpenPOWER on IntegriCloud