summaryrefslogtreecommitdiff
path: root/libbb/copy_file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update mingw.c from latest git/compatRon Yorston2012-03-301-5/+0
|
* Merge commit 'da4441c44f6efccb6f7b7588404d9c6bfb7b6af8' into mergeRon Yorston2012-03-221-4/+4
|\ | | | | | | | | | | | | Conflicts: libbb/vfork_daemon_rexec.c networking/wget.c procps/ps.c
| * libbb/copy_file.c: use smallints instead of signed charsDenys Vlasenko2011-01-281-4/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | copy_file: kkip inode/device checkDaniel Klessing2011-11-211-0/+6
| | | | | | | | | | Inode/Device information is not present under mingw32. Don't rely on it in copy_file.c
* | Added missing stat() tweaks for mingw portZheng, Lei2011-11-201-0/+3
| |
* | Merge branch 'origin/master' (early part)Nguyễn Thái Ngọc Duy2010-09-141-1/+1
|\|
| * *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | | | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: copy_file: always use lstat to avoid macro conflictNguyễn Thái Ngọc Duy2010-09-101-0/+5
|/ | | | | | stat() in win32 port is actual a macro, not a function. Doing it the way it is now won't work. stat/lstat is not different in Windows anyway.
* cosmetic fixesDenys Vlasenko2010-02-061-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* cp: fix -H handlingDenys Vlasenko2010-01-151-2/+2
| | | | | | | function old new delta copy_file 1495 1518 +23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix improper utimes usageDenys Vlasenko2009-11-291-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* some non-gnu compilers can't have non-const struct initializersDenys Vlasenko2009-11-151-2/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* use utimes() rather than obsolescent utime()Bernhard Reutner-Fischer2009-11-151-5/+3
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* *: use "can't" instead of "cannot"Denys Vlasenko2009-11-131-20/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* cp: make "non-POSIX" cp a bit more consistentDenys Vlasenko2009-07-051-34/+28
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* cp: by popular demand, make it POSIX compliant (but less safe)Denys Vlasenko2009-07-051-9/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-1/+1
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* copy_file: handle "cp /dev/foo file" (almost) compatibly to coreutils.Denis Vlasenko2008-03-281-8/+29
| | | | | | (almost because we do not copy mode, which is probably wasn't intended). +61 bytes.
* cp: add ENABLE_FEATURE_VERBOSE_CP_MESSAGE. Closes bug 1470Denis Vlasenko2008-02-131-1/+11
|
* cp: make it a bit closer to POSIX, but still refuse to open andDenis Vlasenko2007-09-111-5/+7
| | | | | write to dest which is a symlink.
* cp: make "cp file /dev/node" special case; explained in commentsDenis Vlasenko2007-09-111-7/+15
| | | | | | | | | | | function old new delta copy_file 1487 1538 +51 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 51/0) Total: 51 bytes text data bss dec hex filename 772502 1051 10724 784277 bf795 busybox_old 772554 1051 10724 784329 bf7c9 busybox_unstripped
* cp: fix recursion check to not waste bytes remembering names of dirsDenis Vlasenko2007-08-271-6/+5
|
* cp: detect and prevent infinite recursionDenis Vlasenko2007-08-271-17/+35
|
* make copy_file() a bit easier to understand, and smallerDenis Vlasenko2007-08-251-67/+66
| | | | | | | | | | | function old new delta copy_file 1565 1447 -118 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-118) Total: -118 bytes text data bss dec hex filename 770938 1063 10788 782789 bf1c5 busybox_old 770814 1063 10788 782665 bf149 busybox_unstripped
* cp: make POSIX-me-harder mode complain with a bit less insane messageDenis Vlasenko2007-08-241-7/+8
|
* do not do utime() on links, it acts on link targets, and we don't want that.Denis Vlasenko2007-06-201-5/+5
| | | | | rename link_name to link_target, less confusing this way.
* style fixes. No code changesDenis Vlasenko2007-04-121-1/+1
|
* bb_full_fd_action: remove potential xmalloc from NOFORK pathDenis Vlasenko2007-04-111-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cat: stop using stdio.h opens libbb: introduce & use open[3]_or_warn function old new delta open3_or_warn - 54 +54 bb_cat 115 144 +29 open_or_warn - 25 +25 unlzma 2404 2412 +8 chattr_main 334 339 +5 xstrtoul_range_sfx 251 255 +4 telnet_main 1514 1510 -4 static.opt 4 - -4 qgravechar 122 118 -4 fuser_add_pid 61 54 -7 fuser_add_inode 154 147 -7 writeFileToTarball 1542 1534 -8 refresh 1156 1148 -8 do_show 856 846 -10 read_leases 212 200 -12 setup_redirects 236 222 -14 iproute_list_or_flush 1582 1568 -14 read_config 427 411 -16 write_leases 284 264 -20 hash_file 338 318 -20 copy_file 1760 1740 -20 do_iproute 2610 2588 -22 bb_full_fd_action 320 269 -51 open_to_or_warn 103 49 -54 fuser_main 1660 1596 -64 .rodata 131160 131096 -64 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 4/19 up/down: 125/-423) Total: -298 bytes
* fix accumulated whitespace and indentation damageDenis Vlasenko2007-03-201-2/+2
|
* copy_file: comment out one condition which is always false.Denis Vlasenko2007-03-151-28/+50
| | | | | | | Add comment explaining POSIX rules for cp - and why these rules are dangerous. Provide conditionally compiled code for both POSIX and safe behaviors, select safe for now. Code shrunk by ~80 bytes.
* stop using big static buffer for inode hashDenis Vlasenko2007-03-141-12/+11
|
* introduce and use setfscreatecon_or_dieDenis Vlasenko2007-03-121-1/+1
| | | | | (patch by Yuichi Nakamura <ynakam@hitachisoft.jp>) runcon: *yet another* fix for vda's brainfart :(
* selinux support by Yuichi Nakamura <ynakam@hitachisoft.jp> (HitachiSoft)Denis Vlasenko2007-03-101-0/+40
|
* syslogd: fix "readpath bug" by using readlink insteadDenis Vlasenko2007-02-111-1/+1
| | | | libbb: rename xgetcwd and xreadlink
* Trailing whitespace removal over entire treeDenis Vlasenko2007-01-111-1/+1
|
* cp: add support for -s, -l. Fix free(nonmalloc) bug.Denis Vlasenko2006-10-211-84/+126
| | | | | Add doc on POSIX's rules on -i and -f (insane!). ln: make "ln dangling_symlink new_link" work.
* bb_applet_name -> applet_nameDenis Vlasenko2006-10-031-1/+1
|
* Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley2006-08-031-3/+1
| | | | | | | | | | 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.)
* The logic to make cp -d or -P treat things like regular files should onlyRob Landley2006-06-241-21/+14
| | | | | | | 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...
* Random cleanup of platform.h.Rob Landley2006-06-131-7/+0
|
* - add and use bb_opendir(), bb_xopendir().Bernhard Reutner-Fischer2006-04-121-2/+1
| | | | | | | | 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
* - move buffer allocation schemes to libbb.hBernhard Reutner-Fischer2006-04-031-1/+1
| | | | - include the correct headers: applets need busybox.h while lib* need libbb.h
* Attempt to make a warning go away without increasing size.Rob Landley2006-03-141-4/+3
|
* just whitespaceTim Riker2006-01-251-1/+1
|
* Fix cp /dev/null filename, and a few in-passing cleanups.Rob Landley2005-11-011-59/+44
|
* applying fix for:Paul Fox2005-07-191-1/+1
| | | | | | 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.
* applying fix from:Paul Fox2005-07-191-3/+7
| | | | | 0000067: cp -p produces misleading error message
* fake out support for POSIX -H and -L options since busybox cp dereferences ↵Mike Frysinger2005-04-141-4/+5
| | | | everything by default
* Dont try and preserve hard links to directories.Glenn L McGrath2004-04-191-1/+3
| | | | | | | 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.
* For the time being, revert the changes for detecting copyingEric Andersen2004-02-221-6/+0
| | | | | | 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.