aboutsummaryrefslogtreecommitdiff
path: root/libbb/copy_file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'busybox' into mergeRon Yorston2018-04-091-1/+1
|\
| * libbb: rename bb_ask -> bb_ask_noecho, bb_ask_confirmation -> ↵Denys Vlasenko2018-04-071-1/+1
| | | | | | | | | | | | bb_ask_y_confirmation Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2017-08-221-1/+4
|\|
| * libarchive: do not extract unsafe symlinks unless $EXTRACT_UNSAFE_SYMLINKS=1Denys Vlasenko2017-08-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta unsafe_symlink_target - 147 +147 unzip_main 2711 2732 +21 copy_file 1657 1678 +21 tar_main 999 971 -28 data_extract_all 1038 984 -54 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/2 up/down: 189/-82) Total: 107 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch busybox (up to "ash: comment out free(p) just before...")Ron Yorston2016-10-191-5/+11
|\|
| * cp: fix -i for POSIX mode. Closes 9106Denys Vlasenko2016-08-131-4/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cp: make verbose cp show symlink copies tooDenys Vlasenko2016-07-141-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2016-07-071-0/+21
|\|
| * cp: add -u/--update and --remove-destinationDenys Vlasenko2016-05-271-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the patch by wdlkmpx@gmail.com function old new delta copy_file 1546 1644 +98 add_partition 1270 1362 +92 ask_and_unlink 95 133 +38 do_iproute 132 157 +25 decode_one_format 710 715 +5 cp_main 369 374 +5 ubirename_main 198 202 +4 read_package_field 232 230 -2 bb_make_directory 421 412 -9 packed_usage 30505 30476 -29 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/3 up/down: 267/-40) Total: 227 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Don't store file details in inode hash tableRon Yorston2014-11-301-6/+0
| |
* | Merge branch 'busybox' into mergeRon Yorston2014-06-301-0/+4
|\|
| * Add conditional support for -v / --verboseDenys Vlasenko2014-05-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With FEATURE_VERBOSE off, practically no size change. With it on: function old new delta remove_file 493 556 +63 install_main 719 765 +46 bb_make_directory 383 419 +36 rmdir_main 162 191 +29 copy_file 1516 1544 +28 mv_main 502 525 +23 cmp_main 677 693 +16 bbconfig_config_bz2 5264 5279 +15 mkdir_main 158 168 +10 install_longopts 66 76 +10 rm_main 167 175 +8 nexpr 840 846 +6 scan_tree 275 280 +5 fsck_main 1807 1811 +4 ed_main 2541 2545 +4 expand_one_var 1574 1575 +1 swap_on_off_main 420 418 -2 parse_command 1443 1440 -3 redirect 1279 1274 -5 do_load 946 918 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 16/4 up/down: 304/-38) Total: 266 bytes Based on the patch by Igor Živković. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Revise mingw_stat to minimise changes from upstream BusyBoxRon Yorston2014-01-071-3/+1
| |
* | Ensure mingw_stat is called when necessaryRon Yorston2012-11-291-1/+3
| | | | | | | | | | | | In some cases a funtion pointer to the stat function is used. The preprocessor can't replace these with the mingw_stat, so make alternative arrangements in those cases.
* | 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.