aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * ash: jobs: Only clear gotsigchld when waiting for everythingDenys Vlasenko2020-02-181-66/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Sat, 19 May 2018 02:39:41 +0800 jobs: Only clear gotsigchld when waiting for everything The gotsigchld flag is always cleared in dowait but not all callers of dowait will wait for everything. In particular, when jp is set we only wait until the set job isn't running anymore. This patch fixes this by only clearing gotsigchld if jp is unset. It also changes the waitcmd to actually set jp which corresponds to the behaviour of bash/ksh93/mksh. The only other caller of dowait that doesn't wait for everything is the jobless reaper. This is in fact redundant now that we wait after every simple command. This patch removes it. Finally as every caller of dowait needs to wait until either the given job is not running, or until all terminated jobs have been processed, this patch moves the loop into dowait itself. Fixes: 03876c0743a5 ("eval: Reap zombies after built-in...") Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: jobs - Do not block when waiting on SIGCHLDDenys Vlasenko2020-02-181-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream comment: Date: Mon, 7 May 2018 00:40:34 +0800 jobs - Do not block when waiting on SIGCHLD Because of the nature of SIGCHLD, the process may have already been waited on and therefore we must be prepared for the case that wait may block. So ensure that it doesn't by using WNOHANG. Furthermore, multiple jobs may have exited when gotsigchld is set. Therefore we need to wait until there are no zombies left. Lastly, waitforjob needs to be called with interrupts off and the original patch broke that. Fixes: 03876c0743a5 ("eval: Reap zombies after built-in...") Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> While at it, removed INT_ON/OFF in waitforjob() - it must be called from INT_OFF region anyway. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: eval: Reap zombies after built-in commands and functionsDenys Vlasenko2020-02-181-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Mon, 26 Mar 2018 23:55:50 +0800 eval: Reap zombies after built-in commands and functions Currently dash does not reap dead children after built-in commands or functions. This means that if you construct a loop consisting of solely built-in commands and functions, then zombies can hang around indefinitely. This patch fixes this by reaping when necessary after each built-in command and function. Reported-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | iconv: minor fixesRon Yorston2020-02-181-13/+14
| | | | | | | | | | | | | | Add an explicit test for EOF. Otherwise when processing input from interactive stdin it's necessary to enter ^Z twice to signal EOF. Allow '-' to be mixed with actual file names on the command line.
* | Merge branch 'busybox' into mergeRon Yorston2020-02-1810-134/+236
|\|
| * ash: exec: Never rehash regular built-insDenys Vlasenko2020-02-171-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Sat, 19 May 2018 02:39:51 +0800 exec: Never rehash regular built-ins As regular (including special) built-ins can never be overridden, we should never remove them from the hash table. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: exec: Stricter pathopt parsingDenys Vlasenko2020-02-171-64/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream comment: Date: Sat, 19 May 2018 02:39:50 +0800 exec: Stricter pathopt parsing This patch changes the parsing of pathopt. First of all only %builtin and %func (with arbitrary suffixes) will be recognised. Any other pathopt will be treated as a normal directory. Furthermore, pathopt can now be specified before the directory, rather than after it. In fact, a future version may remove support for pathopt suffixes. Wherever the pathopt is placed, an optional % may be placed after it to terminate the pathopt. This is so that it is less likely that a genuine directory containing a % sign is parsed as a pathopt. Users of padvance outside of exec.c have also been modified: 1) cd(1) will always treat % characters as part of the path. 2) chkmail will continue to accept arbitrary pathopt. 3) find_dot_file will ignore the %builtin pathopt instead of trying to do a stat in the accompanying directory (which is usually the current directory). The patch also removes the clearcmdentry optimisation where we attempt to only partially flush the table where possible. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: exec: Do not allocate stack string in padvanceDenys Vlasenko2020-02-171-36/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Sat, 19 May 2018 02:39:48 +0800 exec: Do not allocate stack string in padvance Many callers of padvance immediately free the allocated string so this patch moves the stalloc call to the caller. Instead of returning the allocated string, padvance now returns the length to allocate (this may be longer than the actual string length, even including the NUL). For the case where we would previously return NULL, we now return -1. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: memalloc: Add growstackto helperDenys Vlasenko2020-02-171-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Sat, 19 May 2018 02:39:46 +0800 memalloc: Add growstackto helper This patch adds the growstackto helper which repeatedly calls growstackblock until the requested size is reached. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: parser: Save/restore here-documents in command substitutionDenys Vlasenko2020-02-171-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream comment: Date: Sat, 19 May 2018 02:39:42 +0800 parser: Save/restore here-documents in command substitution This patch changes the parsing of here-documents within command substitution, both old style and new style. In particular, the original here-document list is saved upon the beginning of parsing command substitution and restored when exiting. This means that here-documents outside of command substitution can no longer be filled by text within it and vice-versa. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: mkinit: Split reset into exitreset and resetDenys Vlasenko2020-02-171-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Sat, 19 May 2018 02:39:40 +0800 mkinit: Split reset into exitreset and reset Previously reset was called after exitshell. This was changed so that it was called before exitshell because certain state needed to be reset in order for the EXIT trap to work. However, this caused issues because certain other states (such as local variables) should not be reset. This patch fixes this by creating a new function exitreset that is called prior to exitshell and moving reset back to its original location. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: expand: Fix trailing newlines processing in backquote expandingDenys Vlasenko2020-02-175-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Mon, 29 Apr 2019 19:13:37 +0500 expand: Fix trailing newlines processing in backquote expanding According to POSIX.1-2008 we should remove newlines only at the end of the substitution. Newlines-only substitions causes dash to remove newlines before beggining of the substitution. The following code: cat <<END 1 $(echo "") 2 END prints "1<newline>2" instead of expected "1<newline><newline>2". This patch fixes trailing newlines processing in backquote expanding. Signed-off-by: Nikolai Merinov <n.merinov@inango-systems.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: parser: Only accept single-digit parameter expansion outside of bracesDenys Vlasenko2020-02-175-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Mon, 27 May 2019 13:39:37 +0800 parser: Only accept single-digit parameter expansion outside of braces This patch should fix the problem. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2020-02-173-36/+67
|\|
| * ash: shell: Fix clang warnings about "string plus integer"Denys Vlasenko2020-02-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Sat, 15 Dec 2018 18:49:31 +0100 shell: Fix clang warnings about "string plus integer" Building with clang results in some warnings about integer values being added to strings. While the code itself is fine and the warnings are indeed harmless, fixing them also makes the semantic more explicit: what it is actually being increased is the address which points to the start of the string in order to skip the initial character when some conditions are met. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: eval: Use the correct expansion mode for fd redirectionDenys Vlasenko2020-02-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream comment: Date: Mon, 19 Nov 2018 18:00:32 +0800 eval: Use the correct expansion mode for fd redirection It has been reported that echo test >&$EMPTY_VARIABLE causes dash to segfault. This is a symptom of the bigger problem that dash tries to perform pathname expansion as well as field splitting on the word after >& and <&. This is wrong and this patch fixes it to use the same expansions as done on a normal redirection. Reported-by: Andrej Shadura <andrew.shadura@collabora.co.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: expand: Fix skipping of command substitution when trimming in evalvarDenys Vlasenko2020-02-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Mon, 28 May 2018 17:09:48 +0800 expand: Fix skipping of command substitution when trimming in evalvar When we are trimming an unset variable in evalvar, any embedded command substitution that should have been skipped are not. This can cause them to be evaluated later should there be other command substitutions in the same input word. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: main: Print \n upon EOF (CTRL-D) when run interactivelyDenys Vlasenko2020-02-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream comment: Date: Fri, 7 Sep 2018 10:34:14 +0200 main: Print \n upon EOF (CTRL-D) when run interactively Exiting dash via a ^D instead of with "exit" causes dash to forget to print a newline. sh-3.1$ sh sh-3.1$ ^D sh-3.1$ dash $ sh-3.1$ It is more neat and tidy to send a newline similarly to what bash does, so it doesn't make the next prompt of the parent shell look ugly. Suggested by jidanni. Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> [reworded the patch description] Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk> Bug-Debian: http://bugs.debian.org/476422 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: expand: Use HOME in tilde expansion when it is emptyDenys Vlasenko2020-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Sun, 27 May 2018 17:31:57 +0800 expand: Use HOME in tilde expansion when it is empty Currently if HOME is set to empty tilde expansion will fail, i.e., it will remain as a literal tilde. This patch changes it to return the empty string as required by POSIX. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: builtin: Mark more regular built-insDenys Vlasenko2020-02-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Sat, 19 May 2018 02:39:49 +0800 builtin: Mark more regular built-ins This patch marks the following built-ins as regular, meaning that they cannot be overriden using PATH search: hash pwd type ulimit Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: jobs: Replace some uses of fmtstr with stpcpy/stpncpyDenys Vlasenko2020-02-161-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Sat, 19 May 2018 02:39:45 +0800 jobs: Replace some uses of fmtstr with stpcpy/stpncpy Some uses of fmtstr, particularly the ones without a format string, can be replaced with stpcpy or stpncpy. This patch does that so we don't have to introduce unnecessary format strings in order to silence compiler warnings. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: output: Fix fmtstr return valueDenys Vlasenko2020-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Sat, 19 May 2018 02:39:44 +0800 output: Fix fmtstr return value The function fmtstr is meant to return the actual length of output produced, rather than the untruncated length. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: main: Only set savestatus in exitcmdDenys Vlasenko2020-02-161-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Sat, 19 May 2018 02:39:38 +0800 main: Only set savestatus in exitcmd Currently exitcmd sets exitstatus and then savestatus if the latter was previously set. In fact, as exitcmd always raises an exception and will either end up in the setjmp call in main() or exitshell(), where exitstatus is always replaced by savestatus if set, we only need to set savestatus. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: [BUILTIN] Exit without arguments in a trap should use status outside trapsDenys Vlasenko2020-02-163-13/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream commit: Date: Mon Oct 6 10:39:47 2014 +0800 [BUILTIN] Exit without arguments in a trap should use status outside traps POSIX now requires that exit without arguments in a trap should return the last command status prior to executing traps. This patch implements this behaviour. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: parser: Fix incorrect eating of backslash newlinesDenys Vlasenko2020-02-161-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keeping up with upstream (in our case, 'before patch' code is not buggy). Upstream commit: Date: Fri, 11 May 2018 23:41:25 +0800 parser: Fix incorrect eating of backslash newlines With the introduction of synstack->syntax, a number of references to the syntax variable was missed during the conversion. This causes backslash newlines to be incorrectly removed in single quote context. This patch also combines these calls into a new helper function pgetc_top. Fixes: ab1cecb40478 ("parser: Add syntax stack for recursive...") Reported-by: Leah Neukirchen <leah@vuxu.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: use pgetc_eatbnl() in more places, take 2Denys Vlasenko2020-02-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding previously skipped "readtoken1(pgetc_eatbnl(), DQSYNTAX..." changes from upstream commit: Date: Thu Mar 8 08:37:11 2018 +0100 Author: Harald van Dijk <harald@gigawatt.nl> parser: use pgetc_eatbnl() in more places dash has a pgetc_eatbnl function in parser.c which skips any backslash-newline combinations. It's not used everywhere it could be. There is also some duplicated backslash-newline handling elsewhere in parser.c. Replace most of the calls to pgetc() with calls to pgetc_eatbnl() and remove the duplicated backslash-newline handling. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: reduce size of strptime()Ron Yorston2020-02-161-74/+8
| | | | | | | | | | | | | | | | Our implementation of strptime() doesn't support alternative number formats. Rather than duplicate the code for the affected conversion specifications just return to the start of the switch statement. Saves 256 bytes.
* | iconv: more improvementsRon Yorston2020-02-161-55/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | - Only load required functions from mlang.dll. - The '-f' and '-t' options aren't compulsory. - Use xstrdup() instead of xstrndup() and don't check its return value. - Replace string comparisons when checking for encoding options with a single call to index_in_strings(). Saves 224 bytes.
* | win32: save bytes in fnmatchRon Yorston2020-02-161-13/+55
| | | | | | | | | | | | | | Replace several explicit string comparisons with a single call to index_in_strings(). Saves 304 bytes.
* | win32: tidy up detection of device filesRon Yorston2020-02-162-10/+4
| | | | | | | | | | | | | | Define NOT_DEVICE as -1 so the return value of index_in_strings() when no device name is matched is NOT_DEVICE. Make the logic in mingw_open() clearer.
* | win32: save a few bytes in statfsRon Yorston2020-02-161-3/+5
| | | | | | | | | | | | | | Use memset() to fill the structure with zeroes, avoiding the need to set some members explicitly. Saves 16 bytes.
* | Merge branch 'busybox' into mergeRon Yorston2020-02-1513-90/+234
|\|
| * fdisk: add HFS / HFS+ partition typeDenys Vlasenko2020-02-141-6/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tftp: on download, open local file only when first bit of data arrivedDenys Vlasenko2020-02-131-28/+33
| | | | | | | | | | | | | | | | | | | | | | | | No reason to potentially clobber existing file before absolutely necessary. function old new delta tftp_protocol 1947 2020 +73 tftp_main 393 376 -17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 73/-17) Total: 56 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tftp: fix thinko in code shrinkDenys Vlasenko2020-02-131-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tftp: code shrinkDenys Vlasenko2020-02-131-9/+4
| | | | | | | | | | | | | | function old new delta tftp_protocol 1949 1947 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tftpd: show requested file name in open error messageDenys Vlasenko2020-02-131-2/+11
| | | | | | | | | | | | | | function old new delta tftp_protocol 1902 1949 +47 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: fix more "length" cases, closes 12486Denys Vlasenko2020-02-022-5/+40
| | | | | | | | | | | | | | function old new delta next_token 808 831 +23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: allow builtins to be tab-completed, closes 7532Ron Yorston2020-01-294-4/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta complete_cmd_dir_file 678 830 +152 get_builtin_name - 35 +35 optschanged 125 132 +7 hush_main 1069 1076 +7 save_command_ps_at_cur_history 76 78 +2 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/0 up/down: 203/0) Total: 203 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xargs: fix handling of quoted arguments, closes 11441Ron Yorston2020-01-292-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported in bug 11441 when presented with a large number of quoted arguments xargs can return 'argument line too long': seq 10000 29999 | sed -e 's/^/"/' -e 's/$/"/' | busybox xargs echo This happens because the variant of process_stdin() which handles quoted arguments doesn't preserve state between calls. If the allowed number of characters is exceeded part way through a quoted argument the next call to process_stdin() incorrectly treats the terminating quote as a starting quote, thus quoting all of the argument separators. function old new delta process_stdin 274 303 +29 xargs_main 731 745 +14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 43/0) Total: 43 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * vi: fixes to string search in colon commands, closes 10321Ron Yorston2020-01-291-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handling of string searches in colon commands (e.g ':/pat1/,/pat2/cmd') differ from standard vi: - As reported in bug 10321 such searches can't be repeated using the 'n' command. This is because the last search pattern isn't updated. - The search also can't be repeated using the command '://' because an empty search pattern doesn't imply the use of the last search pattern. - Such searches should start on the line after the current line, otherwise '://' never moves to the next occurrence of the pattern. This can also affect other cases where line ranges are specified using search patterns. Fix these various issues. function old new delta get_one_address 325 342 +17 Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: improve expandstr()Ron Yorston2020-01-291-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dash maintainer recently posted a fix for issues with expanding PS1. These had already been fixed differently in BusyBox ash. Borrow a couple of improvements: - Use a single call to setjmp() to trap errors in both readtoken1() and expandarg(). - In case of error set the prompt to the literal value of PS1 rather than the half-digested nonsense in stackblock() which might include ugly control characters. function old new delta expandstr 353 300 -53 Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * syslogd: add config option to include milliseconds in timestampsPeter Korsgaard2020-01-291-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some use cases, having logs with more than 1 second accuracy can be helpful. Add an option to include milliseconds when adding a timestamp in HH:MM:SS.mmm format, similar to syslog-ng with fraq_digits(3) or journalctl -o short-precise. For simplicity, abuse the remaining space in the buffer used by ctime to add the millieconds (overwriting year). function old new delta timestamp_and_log 401 448 +47 Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpd: mangle hostnames starting with dash ("-option")Denys Vlasenko2020-01-141-0/+2
| | | | | | | | | | | | | | function old new delta add_lease 316 328 +12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: save space in statfsRon Yorston2020-02-151-20/+5
| | | | | | | | | | | | | | | | Place filesystem names in a single null-separated string and search it using index_in_strings(). Use the result (offset by 1 to allow for failure) to index an array of filesytem types. Saves 112 bytes.
* | win32: rework device file detectionRon Yorston2020-02-151-6/+4
| | | | | | | | | | | | Improve get_dev_type() and use it to dectect /dev/null in mingw_xopen(). Saves 64 bytes.
* | iconv: code shrink (2)Ron Yorston2020-02-141-86/+34
| | | | | | | | | | | | | | | | | | Rewrite iconv_open/iconv/iconv_close to merge Windows-specific code. Make them static. Use getopt32() to process options. Saves 400 bytes.
* | iconv: code shrinkRon Yorston2020-02-141-456/+457
| | | | | | | | | | | | | | Reduce the size of the codepage alias table by concatenating the alias strings rather than storing pointers to them. Saves 1328 bytes.
* | win32: turn off some unnecessary build optionsRon Yorston2020-02-142-10/+10
| |
* | ash: code shrinkRon Yorston2020-02-141-4/+12
| | | | | | | | | | | | Commit 575581082 (ash: move code from setup_environment()) replaced calls to xsetenv_if_unset() with explicit tests. I don't know why because using xsetenv_if_unset() saves 48 bytes.