<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/coreutils/cp.c, branch cron_changes</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=cron_changes</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=cron_changes'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2025-10-07T08:05:08+00:00</updated>
<entry>
<title>cp: fix `cp -aT` overwriting symlink to directories</title>
<updated>2025-10-07T08:05:08+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2025-10-07T07:13:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a0017a5b5038b3f803ece9140099410c8d4ed4b1'/>
<id>urn:sha1:a0017a5b5038b3f803ece9140099410c8d4ed4b1</id>
<content type='text'>
busybox cp refuses to overwrite another symlink to a directory due to
an incorrect stat() call that should be lstat(). When using -T, we want
to consider the target argument directly without resolving symlinks.

function                                             old     new   delta
cp_main                                              496     514     +18

Signed-off-by: Dominique Martinet &lt;dominique.martinet@atmark-techno.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>cp: fix build failure with long options disabled</title>
<updated>2021-08-15T16:26:56+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-08-10T08:13:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=98cb561b5fd61fe37126fce7d557d5280c762b59'/>
<id>urn:sha1:98cb561b5fd61fe37126fce7d557d5280c762b59</id>
<content type='text'>
When long options were disabled cp failed to compile with:

coreutils/cp.c:130:9: error: empty enum is invalid
  130 |         };
      |         ^

Rearrange the conditional compilation to suit.

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>cp,mv: fix -t DIR option</title>
<updated>2021-06-24T22:23:29+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-06-24T14:08:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a84bbc54257e68ef149cbaff8835c9cb3605c9ac'/>
<id>urn:sha1:a84bbc54257e68ef149cbaff8835c9cb3605c9ac</id>
<content type='text'>
When the '-t DIR' option is used the loop over the remaining
arguments should terminate when a NULL pointer is reached.

function                                             old     new   delta
mv_main                                              585     590      +5
cp_main                                              492     496      +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 9/0)                 Total: 9 bytes

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>cp: implement -n</title>
<updated>2021-06-22T13:28:34+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-06-22T13:28:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=56bbbfae7df48f778362d1848d2a4afd2c293d76'/>
<id>urn:sha1:56bbbfae7df48f778362d1848d2a4afd2c293d76</id>
<content type='text'>
function                                             old     new   delta
.rodata                                           103681  103722     +41
packed_usage                                       33698   33717     +19
copy_file                                           1678    1696     +18
cp_main                                              500     492      -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 78/-8)              Total: 70 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>cp: implement -t DIR</title>
<updated>2021-06-21T17:38:39+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-06-21T17:35:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0ec52d438a41be92d2d8e8651242b4d9faf23a6c'/>
<id>urn:sha1:0ec52d438a41be92d2d8e8651242b4d9faf23a6c</id>
<content type='text'>
function                                             old     new   delta
packed_usage                                       33713   33734     +21
.rodata                                           103670  103672      +2
cp_main                                              506     500      -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 23/-6)              Total: 17 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>cp: preparatory indenting of code block, no code changes</title>
<updated>2021-06-21T17:38:02+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-06-21T17:31:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=1de709fda2e75aeef160b3b13a43865e7a622f06'/>
<id>urn:sha1:1de709fda2e75aeef160b3b13a43865e7a622f06</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>*: --help text tweaks</title>
<updated>2021-04-14T13:15:45+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-04-14T13:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=ba9f9c2d2c57f6041c6c01ba7c0e8379a5f5d440'/>
<id>urn:sha1:ba9f9c2d2c57f6041c6c01ba7c0e8379a5f5d440</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>help text: replace [OPTIONS] with actual options (if not too long)</title>
<updated>2020-12-13T21:34:05+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-12-13T21:34:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=84d5eddb25930ee8a5ff96536ca6f707d793eb24'/>
<id>urn:sha1:84d5eddb25930ee8a5ff96536ca6f707d793eb24</id>
<content type='text'>
function                                             old     new   delta
packed_usage                                       33620   33665     +45

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>libbb: reduce the overhead of single parameter bb_error_msg() calls</title>
<updated>2019-07-02T09:35:03+00:00</updated>
<author>
<name>James Byrne</name>
<email>james.byrne@origamienergy.com</email>
</author>
<published>2019-07-02T09:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=6937487be73cd4563b876413277a295a5fe2f32c'/>
<id>urn:sha1:6937487be73cd4563b876413277a295a5fe2f32c</id>
<content type='text'>
Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by
Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower
overhead call to bb_perror_msg() when only a string was being printed
with no parameters. This saves space for some CPU architectures because
it avoids the overhead of a call to a variadic function. However there
has never been a simple version of bb_error_msg(), and since 2007 many
new calls to bb_perror_msg() have been added that only take a single
parameter and so could have been using bb_simple_perror_message().

This changeset introduces 'simple' versions of bb_info_msg(),
bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and
bb_herror_msg_and_die(), and replaces all calls that only take a
single parameter, or use something like ("%s", arg), with calls to the
corresponding 'simple' version.

Since it is likely that single parameter calls to the variadic functions
may be accidentally reintroduced in the future a new debugging config
option WARN_SIMPLE_MSG has been introduced. This uses some macro magic
which will cause any such calls to generate a warning, but this is
turned off by default to avoid use of the unpleasant macros in normal
circumstances.

This is a large changeset due to the number of calls that have been
replaced. The only files that contain changes other than simple
substitution of function calls are libbb.h, libbb/herror_msg.c,
libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c,
networking/udhcp/common.h and util-linux/mdev.c additonal macros have
been added for logging so that single parameter and multiple parameter
logging variants exist.

The amount of space saved varies considerably by architecture, and was
found to be as follows (for 'defconfig' using GCC 7.4):

Arm:     -92 bytes
MIPS:    -52 bytes
PPC:   -1836 bytes
x86_64: -938 bytes

Note that for the MIPS architecture only an exception had to be made
disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h)
because it made these files larger on MIPS.

Signed-off-by: James Byrne &lt;james.byrne@origamienergy.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>config: update size information</title>
<updated>2018-12-28T02:20:17+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-12-28T02:20:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b097a84d62dcfcf201a695b54bcfafae70cac8a6'/>
<id>urn:sha1:b097a84d62dcfcf201a695b54bcfafae70cac8a6</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
