<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/libbb/copy_file.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>2021-06-28T06:46:32+00:00</updated>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2021-06-28T06:46:32+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-06-28T06:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=e1ad66c0b8fd58a7158d40771175a7dab224202d'/>
<id>urn:sha1:e1ad66c0b8fd58a7158d40771175a7dab224202d</id>
<content type='text'>
</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>Merge branch 'busybox' into merge</title>
<updated>2019-08-16T08:45:21+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2019-08-16T08:42:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=517cf74f6265ec4308b790b637b3f9778cbdc6e0'/>
<id>urn:sha1:517cf74f6265ec4308b790b637b3f9778cbdc6e0</id>
<content type='text'>
</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>win32: fix POSIX build (again)</title>
<updated>2019-03-12T14:41:49+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2019-03-12T14:41:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0a058590010129557bdb9abd26d338297a21f10e'/>
<id>urn:sha1:0a058590010129557bdb9abd26d338297a21f10e</id>
<content type='text'>
Some faulty logic with ENABLE_FEATURE_EXTRA_FILE_DATA broke the
POSIX build.
</content>
</entry>
<entry>
<title>win32: stat(2) succeeds if fetching extra metadata fails</title>
<updated>2019-02-19T10:59:45+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2019-02-19T10:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=8c47a98c9166ff23c3bcbb3e1ef8430b349cf71e'/>
<id>urn:sha1:8c47a98c9166ff23c3bcbb3e1ef8430b349cf71e</id>
<content type='text'>
Some files can't be opened to fetch additional metadata.  When
that happens allow stat(2) to successfully return what data it
has.

In a few cases where the inode number is used to determine if
files are identical ignore invalid inode numbers.
</content>
</entry>
<entry>
<title>win32: make stat(2) fetch additional metadata</title>
<updated>2019-02-16T12:36:52+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2019-02-16T12:36:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=d82db8e9a618ddd9a11cc57aff37f687abb0effb'/>
<id>urn:sha1:d82db8e9a618ddd9a11cc57aff37f687abb0effb</id>
<content type='text'>
Modify the WIN32 implementation of stat(2) to fetch inode number,
device id and number of hardlinks.  This requires opening a handle
to the target file so it will be slower.

A number of features can be enabled or start to work:

- tar can detect if an archive is being stored in itself;
- find can support the -inum and -links options;
- ls can display inode numbers;
- diff can detect attempts to compare a file with itself;
- du has better support for hardlinked files;
- cp can detect attempts to copy a file over itself.
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2018-09-10T13:59:33+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-09-10T13:37:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=d89ced75b204f0eb5611f522864beb81d1b393f5'/>
<id>urn:sha1:d89ced75b204f0eb5611f522864beb81d1b393f5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libbb: fix use-after-free in copy_file</title>
<updated>2018-09-03T08:25:29+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-09-03T08:25:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=3060992ec94722b4f8f3711a1884270c81a6e5f5'/>
<id>urn:sha1:3060992ec94722b4f8f3711a1884270c81a6e5f5</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'busybox'</title>
<updated>2018-07-25T09:41:42+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-07-25T09:41:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=59873514f17cefd6ba3997dad5779f75433fd4e6'/>
<id>urn:sha1:59873514f17cefd6ba3997dad5779f75433fd4e6</id>
<content type='text'>
</content>
</entry>
</feed>
