summaryrefslogtreecommitdiff
path: root/libbb/copy_file.c
AgeCommit message (Collapse)Author
2007-02-11syslogd: fix "readpath bug" by using readlink insteadDenis Vlasenko
libbb: rename xgetcwd and xreadlink
2007-01-11Trailing whitespace removal over entire treeDenis Vlasenko
2006-10-21cp: add support for -s, -l. Fix free(nonmalloc) bug.Denis Vlasenko
Add doc on POSIX's rules on -i and -f (insane!). ln: make "ln dangling_symlink new_link" work.
2006-10-03bb_applet_name -> applet_nameDenis Vlasenko
2006-08-03Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
2006-06-24The logic to make cp -d or -P treat things like regular files should onlyRob Landley
trigger for symlinks, not for device nodes. This should fix "cp -a /dev ." to work as expected (when run by root, anyway). While I was there, cleanup headers and make an #ifdef go away...
2006-06-13Random cleanup of platform.h.Rob Landley
2006-04-12- add and use bb_opendir(), bb_xopendir().Bernhard Reutner-Fischer
text data bss dec hex filename 889445 9392 1035784 1934621 1d851d busybox.gcc-4.2.orig 889297 9392 1035784 1934473 1d8489 busybox.gcc-4.2 889009 9820 1037860 1936689 1d8d31 busybox.gcc-4.1.orig 888817 9820 1037860 1936497 1d8c71 busybox.gcc-4.1
2006-04-03- move buffer allocation schemes to libbb.hBernhard Reutner-Fischer
- include the correct headers: applets need busybox.h while lib* need libbb.h
2006-03-14Attempt to make a warning go away without increasing size.Rob Landley
2006-01-25just whitespaceTim Riker
2005-11-01Fix cp /dev/null filename, and a few in-passing cleanups.Rob Landley
2005-07-19applying fix for:Paul Fox
0000117: Remove linefeed after overwrite prompt using cp -i User input not on the same line as the prompt when about to overwrite a file.
2005-07-19applying fix from:Paul Fox
0000067: cp -p produces misleading error message
2005-04-14fake out support for POSIX -H and -L options since busybox cp dereferences ↵Mike Frysinger
everything by default
2004-04-19Dont try and preserve hard links to directories.Glenn L McGrath
The linux kernel doesnt allow hard links to directories, SUS says its implementation specific. cramfs gives empty directories and 0 length files the same node it makies it difficult to distinguish from hard links.
2004-02-22For the time being, revert the changes for detecting copyingEric Andersen
a directory into itself. It is harder to do this correctly than it appears. Not trying at all seems a better compromise for the time being, untill we can implement this correctly.
2004-02-19Chris Larson (kergoth) writes:Eric Andersen
As Manuel points out, this is a flawed fix, and doesnt fix the following: mkdir -p cpa cpb cpc cp -a cpa cpa/cpb/cpc Attached what appears to be a more sane fix. Apply on top of previous. Please confirm sanity.
2004-02-19Chris Larson (kergoth) writes:Eric Andersen
I was adding -s/--symbolic-link support to busybox cp when I noticed a bug with -r/-a. Test case: mkdir -p test/out cd test busybox cp -a * out/ Will never return until we run out of open files or similar. Coreutils cp on the other hand will error with "cannot copy a directory, `out', into itself, `out'". Patch attached.
2004-01-11Patch from Matt Kraai to fix debian bug #227081Glenn L McGrath
cp does not truncate existing destinations. That is, after running echo foo > foo echo fubar > fubar cp foo fubar the contents of fubar are foo r instead of foo
2003-12-20Use low level file descriptors to match bb_copyfd_eofGlenn L McGrath
2003-11-21As we no longer use function pointers for read in common archiving codeGlenn L McGrath
archive_xread can be replaced with bb_full_read, and archive_copy_file with bb_copyfd* bb_copyfd is split into two functions bb_copyfd_size and bb_copyfd_eof, they share a common backend.
2003-05-26Vodz, last_patch_86Glenn L McGrath
2003-03-19Major coreutils update.Manuel Novoa III
2002-12-13Merge copyfd and copy_file_chunkGlenn L McGrath
2002-09-17last_patch56 from vodz to simplify copy_file logicEric Andersen
2002-09-16Let people force overwrite linksEric Andersen
-Erik
2002-09-16Properly honor FILEUTILS_INTERACTIVE and FILEUTILS_FORCE forEric Andersen
file all file types (not just regular files and dirs). Unlink destination files when needed. -Erik
2002-06-11* libbb/copy_file.c (copy_file): Check st_dev instead of st_rdev.Matt Kraai
2001-12-17Make cp and mv optionally preserve hard links.Matt Kraai
2001-12-11Open the source before creating the destination.Matt Kraai
2001-10-24Major rework of the directory structure and the entire build system.Eric Andersen
-Erik
2001-10-05Invert FILEUTILS_PRESERVE_SYMLINKS into FILEUTILS_DEREFERENCE.Matt Kraai
2001-08-21dfp might be used uninitialized. NULL it.Eric Andersen
2001-06-29Add some missing includes to kill warnings when building with the defaultManuel Novoa III
Config.h and using gcc's -fno-builtin. There are probably other files with the similar problems. Also, if building against uClibc, don't include asm/unistd.h in syscalls.c and module_syscalls.c.
2001-06-11Copy files until EOF, not the reported file size, to deal with bad sizes inMatt Kraai
the proc filesystem.
2001-04-30Made new xreadlink function for libbb and changed applets to use it instead ofMark Whitley
readlink(2).
2001-04-30Fix user permissions of copied directories.Matt Kraai
2001-04-30Simplify permission handling for FIFOs.Matt Kraai
2001-04-30Fix exit status when there is an error copying a file.Matt Kraai
2001-04-27Terminate source correctly when copying symlink. Report and patch byMatt Kraai
Brian Webb <webbb@desertscenes.net>.
2001-04-24Use generic flag names.Matt Kraai
2001-04-24Move applet_name declaration from busybox.h to libbb.h.Matt Kraai
2001-04-23Rewrite cp and mv to be SUSv2 compliant.Matt Kraai
2001-04-20Set permissions of created fileGlenn L McGrath
2001-04-11copy_file_chunk uses streams now.Glenn L McGrath
2001-03-16Convert utility.c into libbb.a. It is now a whole pile of .cEric Andersen
files. Clean up the resulting damage and fix up the makefile. -Erik