The behaviour introduced by commit 31c765081d ("watchdog: stop
watchdog first on startup") causes warnings in the kernel log when the
nowayout feature is enabled:
[ 16.212184] watchdog: watchdog0: nowayout prevents watchdog being stopped!
[ 16.212196] watchdog: watchdog0: watchdog did not stop!
The latter may also appear by itself in case the watchdog is of the
type that cannot be stopped once started (e.g. the common
always-running gpio_wdt kind).
These warnings can be somewhat ominous and distracting, so allow
configuring whether to use this open-write-close-open sequence rather
than just open. Also saves a bit of .text when disabled:
function old new delta
shutdown_on_signal 31 58 +27
watchdog_main 339 306 -33
shutdown_watchdog 34 - -34
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/1 up/down: 27/-67) Total: -40 bytes
Make it default n:
- It's a workaround for one specific type of watchdog (and
that seems to be a defect in the kernel driver)
- Even when not enabled in busybox config, it can easily be
implemented outside busybox
- Code size
- Commit 31c765081d should be considered a regression for all the
boards that now end up with KERN_CRIT warnings in dmesg.
- The author of that commit said "This use case is evidently rare, so
if it is indeed causing problems for other people I'd OK then I
understand whatever needs to be done." in the v1 thread.
Cc: Matt Spinler <mspinler@linux.vnet.ibm.com>
Cc: deweloper@wp.pl
Cc: tito <farmatito@tiscali.it>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
before:
Tiny RPN calculator. Operations:
+, -, *, /, %, ~, ^, |,
p - print top of the stack without popping
f - print entire stack
k - pop the value and set the precision
i - pop the value and set input radix
o - pop the value and set output radix
After:
Tiny RPN calculator. Operations:
Arithmetic: + - * / % ^
~ - divide with remainder
| - modular exponentiation
v - square root
p - print top of the stack without popping
f - print entire stack
k - pop the value and set precision
i - pop the value and set input radix
o - pop the value and set output radix
function old new delta
packed_usage 33519 33565 +46
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
PLATFORM_LINUX is a hidden configuration option which is disabled by
default and enabled at over a hundred locations for features that are
deemed to be Linux specific.
The only effect of PLATFORM_LINUX is to control compilation of
libbb/match_fstype.c. This file is only needed by mount and umount.
Remove all references to PLATFORM_LINUX and compile match_fstype.c
if mount or umount is enabled.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Some editors (like vim) use renaming strategy to save file. That means
they save a file to some random name and then rename it to final
location. The advantage is that such save is atomic.
However, crontab -e holds open fd to the temporary file, meaning it
never sees the changes. The temporary file needs to be re-opened after
the editor terminates for the changes to properly save.
Fixes#12491
Signed-off-by: Gray Wolf <wolf@wolfsden.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
mim runs scripts from a specification file which can be thought
of as an extremely limited Makefile. Neither make variables nor
dependencies are supported. By default the file 'Mimfile' is read.
An example:
hello:
echo hello $1
clean:
rm -rf *
The command 'mim' or 'mim hello' will echo 'hello'. Unlike 'make'
arguments after the first are available to the script; they don't
specify additional targets.
mim isn't enabled by default. Enabling it increases the size of the
binary by about 500 bytes.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Without the 'U' unsigned suffix, gcc will throw a "integer constant is
so large that it is unsigned" warning.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
function old new delta
xc_program_print 712 735 +23
Signed-off-by: Brian Foley <bpfoley@google.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
function old new delta
zxc_vm_process 6884 6891 +7
Signed-off-by: Brian Foley <bpfoley@google.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This matches the behaviour of both GNU dc (as specified in
its man page), and BSD dc (where stack_popstring() pops
only if the head is a string.)
Add a couple of tests to verify this behavior.
function old new delta
zxc_vm_process 6882 6884 +2
Signed-off-by: Brian Foley <bpfoley@google.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>