Based on the patch by Zheng Junling <zhengjunling@huawei.com>
and Chen Gang <cg.chen@huawei.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Storing the original file's modification time in the output file is
harmful (precludes deterministic results) and unlike official gzip,
the busybox version provides no way to suppress this behavior; the -n
option is silently ignored. Rather than trying to make -n work, this
patch just removes the timestamp-storing functionality. It should be
considered deprecated anyway; it's not Y2038-safe and gunzip ignores
it by default.
Per RFC 1952, 0 is the correct value to store to indicate that there
is no timestamp.
Signed-off-by: Rich Felker <dalias@libc.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Some images do not have the default VID offset. The option -O must
be used to attach such images.
Signed-off-by: Micke Prag <micke.prag@telldus.se>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
(re-sending this as it got ignored completey and the format of the
previous mail was probably not correct - please let me know if there's
anything else I can do to get this trivial fix applied)
for telnetd to work, we only need CONFIG_UNIX98_PTYS to be enabled
in the Linux kernel - DEVPTS_FS has been obsolete for some time
Signed-off-by: Martin Kaiser <lists@kaiser.cx>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This speeds up syncing - now happens only just
two replies from a peer. Especially useful for "ntpd -q".
Shouldn't have ill effects: if we chose a bad peer,
we will discover it later and switch to another one.
The code is even smaller this way.
Suggested by Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
We wanted to detect when tv_sec = unsigned1 - unsigned2
underflows by looking at tv_sec's sign. But if tv_sec
is long and it is wider than unsigned, we get unsigned -> long
conversion which is in this case never negative.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This fixes a regression introduced with commit 78854520 (modprobe:
revert checking for /, stop doing basename() on modprobe args,
2015-01-01) that broke modprobe options stored in /etc/modprobe.conf and
/etc/modprobe.d/*.conf.
This also fixes modprobe -r
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
"modprobe -r MODNAME", after it found the full module pathname,
should strip dirpath before trying to remove the module.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
If the :r command is used to read a file after the last line of the
buffer the last line of the buffer and the first line of the file
are joined. An extra blank line appears at the end of the buffer.
file 1
file 1
file 1file 2
file 2
file 2
~
~
The insertion point is normally at the start of the line following the
specified line. When the specified line is the last one the next_line
function baulks at moving to the non-existent following line.
Signed-off-by: Ron Yorston <rmy@tigress.co.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Commit 32afd3a introduced these regressions on the master branch:
Starting vi with no filename on the command line gives the status message
"'(null)' Bad address" instead of "- No file 1/1 100%".
Starting vi with a non-existent file on the command line gives the status
message "'new.txt' No such file or directory" instead of "- new.txt 1/1 100%"
Signed-off-by: Ron Yorston <rmy@tigress.co.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
OpenNTPd is licensed under ISC-style license so it's good idea to keep
ntpd applet under same license to avoid mess, instead of having
our changes to be under GPL.
Names of original code's authors are added.
Signed-off-by: Adam Tkac <vonsch@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This saves a bit of memory but more importantly, allows to create
xmalloc_getpwnam() API where result can be deleted simply using free().
function old new delta
getXXnam 134 173 +39
parse_common 188 212 +24
convert_to_struct 277 290 +13
get_S 90 88 -2
tokenize 129 126 -3
bb_internal_getpwent_r 175 172 -3
getXXnam_r 208 198 -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/4 up/down: 76/-18) Total: 58 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Previous code's trick with bitwise OR was giving this on 32-bit x86:
sizeof(struct passwd):28
sizeof(struct group):16
sizeof(struct spwd):36
sizeof(struct_result):60
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>