ndk-busybox/miscutils
Matt Spinler 31c765081d watchdog: stop watchdog first on startup
Some watchdog implementations may do things other than issue
a reboot on a watchdog timeout.  In this case, there's the
possibility of restarting this program from the state of
the watchdog device not being properly stopped (done by writing
a 'V' and closing the device).  Since it wasn't stopped, the
driver may not be able to restart the watchdog when this program
reopens it and starts pinging it.

To fix this, the code will always first issue the stop when it
starts up.

function                                             old     new   delta
shutdown_on_signal                                     -      32     +32
watchdog_main                                        268     298     +30
shutdown_watchdog                                      -      25     +25
watchdog_shutdown                                     41       -     -41
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/0 up/down: 87/-41)             Total: 46 bytes

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-08 18:35:25 +02:00
..
adjtimex.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
bbconfig.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
beep.c beep: disallow FEATURE_BEEP_FREQ = 0 in configuration 2017-07-08 12:21:45 +02:00
chat.c libbb: consolidate the code to set termios unbuffered mode 2017-01-11 16:17:59 +01:00
Config.src Split miscutils/Config.src items into miscutils/*.c files 2016-11-22 23:14:24 +01:00
conspy.c libbb: consolidate the code to set termios unbuffered mode 2017-01-11 16:17:59 +01:00
crond.c make --help texts smaller 2017-01-21 03:46:57 +01:00
crontab.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
dc.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
devfsd.c Big cleanup in config help and description 2017-01-10 14:58:54 +01:00
devmem.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
fbsplash.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
fbsplash.cfg fbsplash: cosmetic comment and Config text fixes; rename .ini -> .cfg 2008-03-26 15:12:11 +00:00
flash_eraseall.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
flash_lock_unlock.c *: add comment about APPLET_ODDNAME format 2017-01-29 14:57:33 +01:00
flashcp.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
hdparm.c Big cleanup in config help and description 2017-01-10 14:58:54 +01:00
i2c_tools.c i2cdump: don't use common_bufsiz1 2016-06-24 03:58:43 +02:00
inotifyd.c Spelling fixes in comments, documentation, tests and examples 2017-04-17 16:13:32 +02:00
Kbuild.src Remove trailing empty lines 2016-11-23 10:43:39 +01:00
less.c Spelling fixes in comments, documentation, tests and examples 2017-04-17 16:13:32 +02:00
lsscsi.c lsscsi: new applet 2017-04-18 19:26:26 +02:00
makedevs.c makedevs: code shrink 2017-07-06 02:17:24 +02:00
man.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
microcom.c libbb: consolidate the code to set termios unbuffered mode 2017-01-11 16:17:59 +01:00
mt.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
nandwrite.c make --help texts more uniform 2017-01-21 02:49:58 +01:00
partprobe.c partprobe: new applet 2017-04-11 19:17:59 +02:00
raidautorun.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
readahead.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
rfkill.c rfkill: use new-style config/kbuild/applet 2013-11-20 14:21:29 +01:00
runlevel.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
rx.c Replace int -> uint to avoid signed integer overflow 2017-02-04 23:10:22 +01:00
setserial.c *: slap on a few ALIGN1/2s where appropriate 2016-04-22 18:09:21 +02:00
strings.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
time.c time: inplement -f FMT 2017-04-28 18:01:18 +02:00
ttysize.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
ubi_tools.c *: add comment about APPLET_ODDNAME format 2017-01-29 14:57:33 +01:00
ubirename.c whitespace and namespace cleanups 2016-04-03 22:24:51 +02:00
volname.c Convert all miscutils/* applets to "new style" applet definitions 2016-11-22 23:54:17 +01:00
watchdog.c watchdog: stop watchdog first on startup 2017-07-08 18:35:25 +02:00