<feed xmlns='http://www.w3.org/2005/Atom'>
<title>forks/busybox/libbb, branch master</title>
<subtitle>Busybox tree with Carbs Linux patches
</subtitle>
<id>https://git.carbslinux.org/forks/busybox/atom?h=master</id>
<link rel='self' href='https://git.carbslinux.org/forks/busybox/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/'/>
<updated>2021-02-23T11:20:51+00:00</updated>
<entry>
<title>lineedit: support empty PATH entries in tab completion</title>
<updated>2021-02-23T11:20:51+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-02-18T09:50:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=760b627e2ac6aedbf604040951280eaaf75939a8'/>
<id>urn:sha1:760b627e2ac6aedbf604040951280eaaf75939a8</id>
<content type='text'>
Zero-length path prefixes can be specified in PATH as a leading or
trailing colon or two adjacent colons.  POSIX says that the use of
zero-length prefixes to refer to the current directory is a legacy
feature.  Nonetheless the shells in BusyBox respect this feature,
as does 'which'.

Tab-completion of executables using PATH should support this too.

function                                             old     new   delta
complete_cmd_dir_file                                934     931      -3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-3)               Total: -3 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>libbb: fix '--help' handling in FEATURE_SH_NOFORK=y</title>
<updated>2021-02-18T22:30:24+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-02-18T22:30:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=6bdfbc4cb5470f63d4905e89f89a9829af354316'/>
<id>urn:sha1:6bdfbc4cb5470f63d4905e89f89a9829af354316</id>
<content type='text'>
Most BusyBox applets respond to the '--help' option by printing
a usage message.  This is normally handled by busybox_main() so
applet main routines don't have support for '--help'.

In standalone shell mode with FEATURE_SH_NOFORK enabled nofork
applets are invoked directly, bypassing busybox_main().  This
results in inconsistent handling of '--help':

- applets which call getopt() report "unrecognized option '--help'"
  and print help anyway;

- realpath says "--help: No such file or directory" and doesn't
  print help;

- usleep says "invalid number '--help'" and doesn't print help.

Avoid inconsistency by checking for '--help' in run_nofork_applet().

Bug found by Ron Yorston.

function                                             old     new   delta
show_usage_if_dash_dash_help                           -      70     +70
run_nofork_applet                                    347     362     +15
run_applet_no_and_exit                               432     365     -67
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 85/-67)             Total: 18 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: placate -Werror=format-security</title>
<updated>2021-02-18T12:45:49+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-02-18T12:44:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=33745b1fc8cc6d41f4e708d67800d296668af2ce'/>
<id>urn:sha1:33745b1fc8cc6d41f4e708d67800d296668af2ce</id>
<content type='text'>
"In function 'sprint_status48':
 error: format not a string literal and no format arguments"

function                                             old     new   delta
sprint_status48                                      160     158      -2

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>libbb: introduce and use fputs_stdout</title>
<updated>2021-02-03T19:52:40+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-02-03T19:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=cad3fc743aa7c7744e4fcf044371f0fda50fa51f'/>
<id>urn:sha1:cad3fc743aa7c7744e4fcf044371f0fda50fa51f</id>
<content type='text'>
function                                             old     new   delta
fputs_stdout                                           -      12     +12
zxc_vm_process                                      7237    7230      -7
yes_main                                              85      78      -7
write_block                                          380     373      -7
wrapf                                                305     298      -7
strings_main                                         437     430      -7
show_bridge                                          353     346      -7
rev_main                                             384     377      -7
put_prompt_custom                                     58      51      -7
put_cur_glyph_and_inc_cursor                         168     161      -7
print_numbered_lines                                 152     145      -7
print_named_ascii                                    130     123      -7
print_name                                           135     128      -7
print_login_issue                                    386     379      -7
print_ascii                                          208     201      -7
powertop_main                                       1249    1242      -7
od_main                                             1789    1782      -7
logread_main                                         518     511      -7
head_main                                            804     797      -7
display_process_list                                1319    1312      -7
cut_main                                            1002     995      -7
bb_dump_dump                                        1550    1543      -7
bb_ask_noecho                                        393     386      -7
baseNUM_main                                         702     695      -7
expand_main                                          755     745     -10
dumpleases_main                                      497     487     -10
write1                                                12       -     -12
putcsi                                                37      23     -14
print_login_prompt                                    55      41     -14
paste_main                                           525     511     -14
cat_main                                             440     426     -14
print_it                                             245     230     -15
print_addrinfo                                      1188    1171     -17
print_rule                                           770     750     -20
print_linkinfo                                       842     822     -20
httpd_main                                           791     771     -20
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/34 up/down: 12/-341)         Total: -329 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>libbb: code shrink fgets_str</title>
<updated>2021-02-03T19:43:07+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-01-23T13:22:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=6ad38d66d08a2646c6423b967a790656ae026c95'/>
<id>urn:sha1:6ad38d66d08a2646c6423b967a790656ae026c95</id>
<content type='text'>
Use a NULL value of maxsz_p to indicate to xmalloc_fgets_internal()
that the caller doesn't care about the maximum size of the buffer.
This allows the default maximum size to be set once in
xmalloc_fgets_internal() instead of separately in each caller.

function                                             old     new   delta
xmalloc_fgets_internal                               273     287     +14
xmalloc_fgets_str                                     30       9     -21
xmalloc_fgetline_str                                  33      12     -21
xmalloc_fgets_str_len                                 38      10     -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 14/-70)            Total: -56 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>nl: ensure '-b n' option displays file content</title>
<updated>2021-02-02T16:37:41+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-01-21T08:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=c849e72c0b216578f96b763529c5e58056d0662c'/>
<id>urn:sha1:c849e72c0b216578f96b763529c5e58056d0662c</id>
<content type='text'>
The command 'nl -b n' should output no line numbers, just some
spaces as a placeholder followed by the actual file content.

Add tests for line numbering by cat and nl.  The correct results
were obtained from coreutils.

function                                             old     new   delta
print_numbered_lines                                 152     157      +5
.rodata                                           182456  182453      -3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 5/-3)                Total: 2 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>libbb: code shrink and speed up index_in_strings()</title>
<updated>2021-02-02T13:37:37+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-01-29T13:23:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=bcf91d276047910538c5de0a45f3a4645e3ff471'/>
<id>urn:sha1:bcf91d276047910538c5de0a45f3a4645e3ff471</id>
<content type='text'>
Rewrite index_in_strings() to replace calls to strcmp()/strlen().
With this change searching for valid names in the applet_names
array (for example) is 40% faster.

The code has to assume the strings aren't sorted, so will always scan
the entire array when presented with an invalid name.

function                                             old     new   delta
index_in_strings                                      63      56      -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-7)               Total: -7 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>libbb: code shrink and speed up find_applet_by_name()</title>
<updated>2021-02-02T13:16:38+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-01-29T13:22:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=59120c330330467c9e6aaec6d4ca8295baa653af'/>
<id>urn:sha1:59120c330330467c9e6aaec6d4ca8295baa653af</id>
<content type='text'>
find_applet_by_name() determines the appropriate range of applet
indices to check for the given name and performs a linear search in
applet_names[].

Revise the code so the index of the upper bound of the range, 'max',
isn't calculated.  Instead check the value of the first non-matching
character to see if we've reached the end of the range.

This new code speeds up the time to find a valid applet name by 6%
and halves the time to detect that a given name is invalid.  The
average time to detect an invalid name is now the same as for a valid
one.

function                                             old     new   delta
find_applet_by_name                                  155     133     -22
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-22)             Total: -22 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>update_passwd: fix context variable</title>
<updated>2021-01-14T16:03:25+00:00</updated>
<author>
<name>Bernd Kuhls</name>
<email>bernd.kuhls@t-online.de</email>
</author>
<published>2021-01-10T12:20:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=808d93c0eca49e0b22056e23d965f0d967433fbb'/>
<id>urn:sha1:808d93c0eca49e0b22056e23d965f0d967433fbb</id>
<content type='text'>
Commit
https://git.busybox.net/busybox/commit/libbb/update_passwd.c?id=2496616b0a8d1c80cd1416b73a4847b59b9f969a

changed the variable used from context to seuser but forgot this
change resulting in build errors detected by buildroot autobuilders:

http://autobuild.buildroot.net/results/b89/b89b7d0f0601bb706e76cea31cf4e43326e5540c//build-end.log

libbb/update_passwd.c:51:11: error: 'context' undeclared (first use in
 this function); did you mean 'ucontext'?
   freecon(context);

Signed-off-by: Bernd Kuhls &lt;bernd.kuhls@t-online.de&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Fix missing "crypt.h" compilation error on the FreeBSD</title>
<updated>2021-01-04T12:28:28+00:00</updated>
<author>
<name>Alex Samorukov</name>
<email>samm@os2.kiev.ua</email>
</author>
<published>2021-01-04T00:36:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=09aba8bac466ce8fb94a6b5ee587d81415ff4c44'/>
<id>urn:sha1:09aba8bac466ce8fb94a6b5ee587d81415ff4c44</id>
<content type='text'>
FreeBSD does not use crypt.h, but unistd.h which is already included

Signed-off-by: Alex Samorukov &lt;samm@os2.kiev.ua&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
