mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 21:17:55 +00:00
etc/ash_function's warn/die/TRACE/DEBUG now output also under /dev/kmsg when DEBUG is enabled
This commit is contained in:
parent
4ff955918f
commit
0416896b82
@ -4,26 +4,34 @@
|
||||
# busybox ash on legacy-flash boards, and with bash on all other boards.
|
||||
|
||||
die() {
|
||||
echo >&2 " !!! ERROR: $* !!!";
|
||||
if [ "$CONFIG_DEBUG_OUTPUT" = "y" ];then
|
||||
echo " !!! ERROR: $* !!!" | tee -a /tmp/debug.log /dev/kmsg > /dev/null;
|
||||
else
|
||||
echo >&2 "!!! ERROR: $* !!!";
|
||||
fi
|
||||
sleep 2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
warn() {
|
||||
echo >&2 " *** WARNING: $* ***";
|
||||
if [ "$CONFIG_DEBUG_OUTPUT" = "y" ];then
|
||||
echo " *** WARNING: $* ***" | tee -a /tmp/debug.log /dev/kmsg > /dev/null;
|
||||
else
|
||||
echo >&2 " *** WARNING: $* ***";
|
||||
fi
|
||||
sleep 1;
|
||||
}
|
||||
|
||||
DEBUG() {
|
||||
if [ "$CONFIG_DEBUG_OUTPUT" = "y" ];then
|
||||
echo "DEBUG: $*" | tee -a /tmp/debug.log >&2;
|
||||
echo "DEBUG: $*" | tee -a /tmp/debug.log /dev/kmsg > /dev/null;
|
||||
fi
|
||||
}
|
||||
|
||||
TRACE() {
|
||||
if [ "$CONFIG_ENABLE_FUNCTION_TRACING_OUTPUT" = "y" ];then
|
||||
echo "TRACE: $*" | tee -a /tmp/debug.log >&2;
|
||||
fi
|
||||
if [ "$CONFIG_ENABLE_FUNCTION_TRACING_OUTPUT" = "y" ];then
|
||||
echo "TRACE: $*" | tee -a /tmp/debug.log /dev/kmsg > /dev/null;
|
||||
fi
|
||||
}
|
||||
|
||||
preserve_rom() {
|
||||
|
Loading…
Reference in New Issue
Block a user