summaryrefslogtreecommitdiff
path: root/bin/mv/mv.c
AgeCommit message (Collapse)Author
2003-07-29spacingTheo de Raadt
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-03-21Fix some typos in comments; Patrick LatifiTodd C. Miller
2003-03-13Use the return value of strcpy() to detect ENAMETOOLONG instead ofTodd C. Miller
doing an extra strlen; deraadt@ OK
2003-03-13lots of sprintf -> snprintf and strcpy -> strlcpy; checked by teduTheo de Raadt
2002-07-04ansiTheo de Raadt
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2002-01-25Stat source path at the top of do_move() and return an error ifTodd C. Miller
this fails. Previously, "mv nonexistent file_with_no_write_perms" would prompt whether or not to overwrite the file w/o write perms even though 'nonexistent' would fail to lstat() later on.
2002-01-16missed some registers, kill'em!Mike Pechkin
millert@ ok
2001-12-01KNFTheo de Raadt
2001-09-06o) __progname aria;Mike Pechkin
millert@ ok.
2001-07-09correct type on last arg to execl(); nordin@cse.ogi.eduTheo de Raadt
2001-01-08Fix a bug in previous commit; we need a separate stat buffer forTodd C. Miller
the "from" file due to changing the order of stat calls.
2001-01-06Fix 3 cases related to symbolic links when moving between filesystes:Todd C. Miller
1) incorrectly refused to move a symlink to a mount point 2) refused to move a symlink to a non-existent file 3) copied the contents of a symlink instead of the link itself. Closes PR 1368; james@oaktree.co.uk
1999-12-24Try to preserve file flags in mv (Kamo Hiroyasu <wd@ics.nara-wu.ac.jp>)Angelos D. Keromytis
1999-07-26When using the -i option, check for the existence of the source file beforeAaron Campbell
asking for confirmation, and if it doesn't exist, just complain and exit. This is NetBSD PR/8073; deraadt@ ok.
1999-01-12use pid_tAaron Campbell
1998-07-02indentTheo de Raadt
1998-07-02Fix mv b/ a where a is a directory.Constantine Sapuntzakis
1998-05-18MAXPATHLEN not MAXPATHLEN+1, no buf oflow of targdirTheo de Raadt
1997-09-28avoid looping on question; wosch@freebsdTheo de Raadt
1997-04-12don't print more directory slashes than user specified on error.michaels
Reported by Nick Sayer (nsayer@quack.kfu.com) in FreeBSD pr bin/3025.
1997-03-01Error out if someone tries to mv a mount point. Old behavior was toTodd C. Miller
move all files contained in the mounted filesystem to the dest. dir which could be quite nasty. Personally, I think rename(2) should return EPERM or EINVAL instead of EXDEV.
1997-02-02Remember errno if fchown() fails so we get correct warningsThorsten Lockert
Only warn about not being able to restore user/group owner if not -f
1996-12-14-Wall'ing.Michael Shalayeff
1996-08-02zap getopt() case of -?, come on, it is the default!Theo de Raadt
1996-07-30regarding freebsd pr#1351 & pr#1377 re: fastcopy(); kill "wrong gid butTheo de Raadt
group-readable" window; do not setuid/setgid if fchown() fails.
1996-06-23update rcsidTheo de Raadt
1995-10-18initial import of NetBSD treeTheo de Raadt