aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * hush: code shrinkDenys Vlasenko2023-01-031-4/+9
| | | | | | | | | | | | | | function old new delta run_list 1032 1012 -20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: trivial code shrinkDenys Vlasenko2023-01-031-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xxd: use bb_simple_perror_msg... where appropriateDenys Vlasenko2023-01-031-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: fix compile failures in some configsDenys Vlasenko2023-01-034-15/+31
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Makefile.flags: add resolv to LDLIBS for linux compilers too (not only gnu ones)Denys Vlasenko2023-01-021-0/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sed: fix double-free in FEATURE_CLEAN_UP=y configsDenys Vlasenko2023-01-021-4/+13
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mv: fix error in !VERBOSE configsDenys Vlasenko2023-01-021-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/loop: fix compile failure (name collision)Denys Vlasenko2023-01-021-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * testsuite/sha1sum.tests: fix false positive failureDenys Vlasenko2023-01-021-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * testsuite/tree.tests: fix false positive failureDenys Vlasenko2023-01-021-18/+20
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xxd: fix use of non-initialized dataDenys Vlasenko2023-01-021-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xargs: implement -o, closes 15146Denys Vlasenko2022-12-221-34/+51
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta .rodata 105225 105259 +34 d6_listen_socket 150 180 +30 packed_usage 34512 34532 +20 d6_read_interface 595 581 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 84/-14) Total: 70 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: fix binding to network aliasesDenys Vlasenko2022-12-151-4/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcp: add a few comments, no code changesDenys Vlasenko2022-12-152-0/+11
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: use a different default config scriptDenys Vlasenko2022-12-152-3/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: align FF02__1_2[]Denys Vlasenko2022-12-153-5/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * more: accept and ignore -eNatanael Copa2022-12-141-1/+2
| | | | | | | | | | | | | | | | Accept and ignore -e which is specified in POSIX. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/more.html Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: add some commentsDenys Vlasenko2022-12-142-12/+39
| | | | | | | | | | | | RFCs for DHCPv6 are written rather badly... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: remove stray commentDenys Vlasenko2022-12-131-1/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: shrink del_loop()Denys Vlasenko2022-12-131-1/+1
| | | | | | | | | | | | | | function old new delta del_loop 52 49 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * loop: restore the correct return vaule of set_loop()Denys Vlasenko2022-12-131-4/+8
| | | | | | | | | | | | It is only used by mount's error path, though... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * loop: optionally use ioctl(LOOP_CONFIGURE) to set up loopdevsDenys Vlasenko2022-12-132-9/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOOP_CONFIGURE is added to Linux 5.8 function old new delta NO_LOOP_CONFIGURE (old code): set_loop 784 782 -2 LOOP_CONFIGURE: set_loop 784 653 -131 TRY_LOOP_CONFIGURE: set_loop 784 811 +27 Based on a patch by Xiaoming Ni <nixiaoming@huawei.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * testsuite/mount.tests: accomodate umount failure seen on 5.18.0Denys Vlasenko2022-12-131-1/+13
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * loop: refactor: extract subfunction set_loopdev_params()Xiaoming Ni2022-12-131-39/+51
| | | | | | | | | | | | | | | | | | | | Extract subfunction set_loop_info() from set_loop() function old new delta set_loop 760 784 +24 Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * loop: simplify code of LOOP_SET_FD failureXiaoming Ni2022-12-121-7/+3
| | | | | | | | | | | | | | | | function old new delta set_loop 790 760 -30 Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * loop: refactor: extract subfunction get_next_free_loop()Xiaoming Ni2022-12-121-30/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Extract subfunction get_next_free_loop() from set_loop() Also fix miss free(try) when stat(try) and mknod fail function old new delta set_loop 807 790 -17 Fixes: 3448914e8cc5 ("mount,losetup: use /dev/loop-control is it exists") Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xxd: fix typo in trivial usageBrandon Maier2022-12-081-1/+1
| | | | | | | | | | Signed-off-by: Brandon Maier <brandon.maier@collins.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip -l: add missed big-endian conversions date and timePeter Kaestle2022-11-291-0/+2
| | | | | | | | | | | | | | | | When calling unzip -l the date and time output was missing big-endian conversions. Signed-off-by: Peter Kaestle <peter.kaestle@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Remove "select PLATFORM_LINUX"Denys Vlasenko2022-11-2954-70/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix non-Linux buildsSamuel Thibault2022-11-2956-3/+89
| | | | | | | | | | | | | | | | | | | | | | Various tools are Linuxish and should thus only attempted to build on Linux only. Some features are also Linux-only. Also, libresolv is used on all GNU platforms, notably GNU/Hurd and GNU/kfreeBSD. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fbset: support setting pixel clock rateDario Binacchi2022-11-161-0/+3
| | | | | | | | | | | | | | | | | | | | Only in case the FEATURE_FBSET_FANCY configuration is enabled. function old new delta fbset_main 733 766 +33 Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fbset: abort on not handled optionsDario Binacchi2022-11-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all options are actually implemented. In this case, return a message and an error code to make it clear that the requested command has not been executed. function old new delta .rodata 105200 105224 +24 fbset_main 747 733 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 24/-14) Total: 10 bytes Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * loop: fix a race when a free loop device is snatchedXiaoming Ni2022-11-151-1/+10
| | | | | | | | | | | | | | | | | | | | | | When /dev/loop-control exists and *device is empty, the mount may fail if a concurrent mount is running. function old new delta set_loop 809 807 -2 Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * pkill: add -e to display the name and PID of the process being killedLouis Sautier2022-10-141-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This mimics the behaviour of pkill -e / --echo from procps. function old new delta .rodata 105179 105200 +21 packed_usage 34523 34516 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 21/-7) Total: 14 bytes Signed-off-by: Louis Sautier <sautier.louis@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: revised implementation of setlinebuf(3)Ron Yorston2022-12-311-1/+1
| | | | | | | | | | | | | | | | | | Microsoft Windows' setvbuf() doesn't support line buffering and doesn't accept 0 as a valid value for the buffer size argument. Replace the old macro definition with an implementation that doesn't do anything. It's only used if debug is enabled in ash so there's no effect on the default build.
* | libbb: speed up bb_get_chunk_from_file()Ron Yorston2022-12-301-0/+9
| | | | | | | | | | | | | | | | Use _getc_nolock() in bb_get_chunk_from_file() and perform code page translation on the resulting string. This speeds up grep by another factor of two. (GitHub issue #278)
* | win32: speed up getc(3) wrapperRon Yorston2022-12-301-2/+2
| | | | | | | | | | | | | | | | The grep applet was found to be rather slow. A major reason for this is the implementation of getc(3). Using _getc_nolock() and inlining is_console_in() speeds things up by a factor of three. (GitHub issue #278)
* | win32: always allow d_type member of struct direntRon Yorston2022-12-222-4/+0
| | | | | | | | | | | | | | | | The d_type member of struct dirent is required by the implementation of glob(3). As a result it isn't possible to build the make applet unless FEATURE_EXTRA_FILE_DATA is configured. Allow d_type unconditionally.
* | win32: prevent stat(2) from updating access timesRon Yorston2022-12-221-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WIN32 implementation of stat(2) reads the contents of some files to see if they're executable. This may update the file access time. Avoid this by a special call to SetFileTime() after opening the file. For details see: https://devblogs.microsoft.com/oldnewthing/20111010-00/?p=9433 https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfiletime File access times aren't updated by default in recent versions of Windows. This commit is only necessary if updating of file access times is explicitly enabled: fsutil behavior set DisableLastAccess 0
* | make: fixes to test scriptRon Yorston2022-12-121-0/+3
| | | | | | | | | | | | | | | | Unset MAKEFLAGS in the test script so it works if it's run using a version of make that has options which pdpmake doesn't understand. Return $FAILCOUNT as the exit status so the number of failures can be reported.
* | getopt: use name supplied with '-n' to report errorRon Yorston2022-11-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows: $ getopt -o a -n my_script -- -z getopt: unknown option -- z On Linux: $ getopt -o a -n my_script -- -z my_script: unknown option -- z The difference arises because the Mingw-w64 implementation of getopt(3) uses __argv[0] to report errors, not the first element of the argument array passed to it. Make __argv[0] point to the name supplied with the '-n' option to match behaviour when glibc getopt(3) is used. (GitHub issue #274)
* | make: add '-x' option to set pragmasRon Yorston2022-11-211-50/+92
| | | | | | | | | | | | Add a command line option to allow pragmas to be set. This is an alternative to the use of the .PRAGMA special target. The same pragmas are supported.
* | make: add .PRAGMA special targetRon Yorston2022-11-181-38/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the special target .PRAGMA. This allows certain features of the POSIX standard to be disabled when POSIX mode is being enforced. This is done by setting prerequisites of .PRAGMA, as follows: - macro names containing '-' are permitted with the 'macro_name' prerequisite; - target names containing '-' or '/' are permitted with the 'target_name' prerequisite; - the '#' character isn't treated as the start of a comment in a command line with the 'command_comment' prerequisite; - an empty suffix is permitted in a macro expansion of the form $(VAR:=.c) with the 'empty_suffix' prerequisite. Additionally the 'posix_202x' prerequisite enforces the future POSIX standard instead of the current one. In this case the 'macro_name' and 'target_name' pragmas aren't required as the future standard will allow the additional characters. .PRAGMA without any prerequisites restores the default behaviour.
* | build system: allow monochrome 'make menuconfig'Ron Yorston2022-11-161-0/+3
| | | | | | | | | | | | | | | | | | 'make menuconfig' uses a hardcoded colour palette which may be difficult to read. Add support for the 'COLORS' environment variable. Setting this to '0' will cause 'make menuconfig' to be displayed in black and white. (GitHub issue #273)
* | make: changes to suffix substitution in macro expansionRon Yorston2022-11-162-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The POSIX standard defines suffix substitution in macro expansion as taking the form: $(string1 [: subst1 =[ subst2 ]]) Since 'subst1' isn't bracketed a value must be supplied. Enforce this in POSIX mode. As a non-POSIX extension an empty 'subst1' is permitted with 'subst2' being added to all words unconditionally. If both 'subst1' and 'subst2' are empty the words are returned unchanged.
* | make: show location of errors during buildRon Yorston2022-11-161-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error messages only displayed the location of an error while the makefile was being parsed. Store the location (makefile name and line number) of each command line. This allows location information to be displayed in errors encountered while targets are being built. Take this Makefile, for example: target: @echo $(hello Previously this would display: make: unterminated variable '$(hello' Now it shows: make: (Makefile:2): unterminated variable '$(hello'
* | make: fix typo in help textRon Yorston2022-11-141-2/+2
| |
* | win32: native make menuconfig: support searchAvi Halachmi (:avih)2022-11-131-5/+21
| | | | | | | | | | | | | | Previously, pressing slash to search at the menu aborted the menu program ('mconf'), because regexp is not available with native mingw. Now it works, but the search is of plain string rather than regexp.
* | make: use correct test for valid macro nameRon Yorston2022-11-132-1/+14
| | | | | | | | | | The test for valid macro names in POSIX mode was incorrect: it shouldn't have allowed '-'.
* | make: pdpmake needs long filename support in ar tooRon Yorston2022-11-131-1/+1
| | | | | | | | | | | | Commit f261d2d27 (make: make + sh configuration) added a 'pdpmake' alias for 'make'. It omitted to reference PDPMAKE as a dependency for FEATURE_AR_LONG_FILENAMES.