2007-03-11 13:25:35 +00:00
|
|
|
TAINT_PROPRIETARY_MODULE=1
|
|
|
|
TAINT_FORCED_MODULE=2
|
|
|
|
TAINT_UNSAFE_SMP=4
|
|
|
|
TAINT_FORCED_RMMOD=8
|
|
|
|
TAINT_MACHINE_CHECK=16
|
|
|
|
TAINT_BAD_PAGE=32
|
|
|
|
|
|
|
|
add_1tainted() {
|
|
|
|
tainted=$(cat /proc/sys/kernel/tainted)
|
|
|
|
if [ "$tainted" -gt 0 ]; then
|
|
|
|
local s
|
2007-09-16 10:29:09 +00:00
|
|
|
[ $(($tainted & $TAINT_PROPRIETARY_MODULE)) -ne 0 ] && s="P" || s="G"
|
|
|
|
[ $(($tainted & $TAINT_FORCED_MODULE)) -ne 0 ] && s="${s}F" || s="$s "
|
|
|
|
[ $(($tainted & $TAINT_UNSAFE_SMP)) -ne 0 ] && s="${s}S" || s="$s "
|
|
|
|
[ $(($tainted & $TAINT_FORCED_RMMOD)) -ne 0 ] && s="${s}R" || s="$s "
|
|
|
|
[ $(($tainted & $TAINT_MACHINE_CHECK)) -ne 0 ] && s="${s}M" || s="$s "
|
|
|
|
[ $(($tainted & $TAINT_BAD_PAGE)) -ne 0 ] && s="${s}B" || s="$s "
|
|
|
|
echo '** Tainted:' $s "($tainted)" >&3
|
2007-03-11 13:25:35 +00:00
|
|
|
echo >&3
|
|
|
|
else
|
|
|
|
echo '** Not tainted' >&3
|
|
|
|
echo >&3
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
ask_1tainted() {
|
|
|
|
true
|
|
|
|
}
|